build: minify prod build

closes #70
This commit is contained in:
Aleksey Rowan 2023-11-15 14:10:43 -05:00 committed by GitHub
parent e60294b950
commit 7330e7499a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,6 +38,7 @@ const context = await esbuild.context({
sourcemap: prod ? false : "inline", sourcemap: prod ? false : "inline",
treeShaking: true, treeShaking: true,
outfile: "main.js", outfile: "main.js",
minify: prod,
}); });
if (prod) { if (prod) {
@ -45,4 +46,4 @@ if (prod) {
process.exit(0); process.exit(0);
} else { } else {
await context.watch(); await context.watch();
} }