Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't minify during development #593

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/vscode/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ runBuild({
entryPoints: ['./src/main.ts'],
outfile: './out/main.js',
external: ['vscode'],
minify: dev,
dev
});
13 changes: 5 additions & 8 deletions packages/build/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export interface BuildOptions {
outfile: string;
assets?: Array<AssetPair>;
bundle?: boolean; // true
minify?: boolean; // false
format?: Format; // cjs
platform?: Platform; // node
external?: string[]; // []
Expand All @@ -36,25 +35,24 @@ export async function runBuild(options: BuildOptions) {
bundle = true,
format = 'cjs',
platform = 'node',
minify = false,
external,
dev = false
} = options;

await build({
await build({
entryPoints,
outfile,
bundle,
minify,
minify: !dev,
cscheid marked this conversation as resolved.
Show resolved Hide resolved
format,
platform,
external,
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 +63,8 @@ export async function runBuild(options: BuildOptions) {
}),
] : [],
});

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