Skip to content

Commit

Permalink
Don't minify during development (#593)
Browse files Browse the repository at this point in the history
* Don't minify during development

* Keep `minify` to make even more minimal fix
  • Loading branch information
DavisVaughan authored Nov 1, 2024
1 parent 5919680 commit b6a1ef4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions apps/lsp/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ runBuild({
{ from: ['../../packages/editor-server/src/resources/**'], to: './dist/resources/' },
{ from: ['../../packages/quarto-core/src/resources/**'], to: './dist/resources/' },
{ from: ['./dist/**'], to: ['../vscode/out/lsp/'] }],
minify: !dev,
dev
})
2 changes: 1 addition & 1 deletion apps/vscode/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ runBuild({
entryPoints: ['./src/main.ts'],
outfile: './out/main.js',
external: ['vscode'],
minify: dev,
minify: !dev,
dev
});
11 changes: 5 additions & 6 deletions packages/build/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ export async function runBuild(options: BuildOptions) {
outfile,
assets,
bundle = true,
minify = false,
format = 'cjs',
platform = 'node',
minify = false,
external,
dev = false
} = options;

await build({
await build({
entryPoints,
outfile,
bundle,
Expand All @@ -52,9 +52,9 @@ export async function runBuild(options: BuildOptions) {
sourcemap: dev,
watch: dev ? {
onRebuild(error) {
if (error)
if (error)
console.error('[watch] build failed:', error)
else
else
console.log('[watch] build finished')
},
} : false,
Expand All @@ -65,9 +65,8 @@ export async function runBuild(options: BuildOptions) {
}),
] : [],
});

if (dev) {
console.log("[watch] build finished, watching for changes...");
}
}

0 comments on commit b6a1ef4

Please sign in to comment.