Skip to content

Commit b6a1ef4

Browse files
authored
Don't minify during development (#593)
* Don't minify during development * Keep `minify` to make even more minimal fix
1 parent 5919680 commit b6a1ef4

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

apps/lsp/build.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ runBuild({
3030
{ from: ['../../packages/editor-server/src/resources/**'], to: './dist/resources/' },
3131
{ from: ['../../packages/quarto-core/src/resources/**'], to: './dist/resources/' },
3232
{ from: ['./dist/**'], to: ['../vscode/out/lsp/'] }],
33+
minify: !dev,
3334
dev
3435
})

apps/vscode/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ runBuild({
2222
entryPoints: ['./src/main.ts'],
2323
outfile: './out/main.js',
2424
external: ['vscode'],
25-
minify: dev,
25+
minify: !dev,
2626
dev
2727
});

packages/build/src/index.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ export async function runBuild(options: BuildOptions) {
3434
outfile,
3535
assets,
3636
bundle = true,
37+
minify = false,
3738
format = 'cjs',
3839
platform = 'node',
39-
minify = false,
4040
external,
4141
dev = false
4242
} = options;
4343

44-
await build({
44+
await build({
4545
entryPoints,
4646
outfile,
4747
bundle,
@@ -52,9 +52,9 @@ export async function runBuild(options: BuildOptions) {
5252
sourcemap: dev,
5353
watch: dev ? {
5454
onRebuild(error) {
55-
if (error)
55+
if (error)
5656
console.error('[watch] build failed:', error)
57-
else
57+
else
5858
console.log('[watch] build finished')
5959
},
6060
} : false,
@@ -65,9 +65,8 @@ export async function runBuild(options: BuildOptions) {
6565
}),
6666
] : [],
6767
});
68-
68+
6969
if (dev) {
7070
console.log("[watch] build finished, watching for changes...");
7171
}
7272
}
73-

0 commit comments

Comments
 (0)