Minified production version

This commit is contained in:
Andrea Alberti 2024-10-19 21:09:28 +02:00
parent 99836806a7
commit 95d2f5252e

View file

@ -40,11 +40,18 @@ const context = await esbuild.context({
...builtins
],
format: "cjs",
target: "es2018",
logLevel: "info",
sourcemap: prod ? false : "inline",
treeShaking: true,
outdir,
target: "es2022",
logLevel: "info",
sourcemap: prod ? false : "inline",
minifySyntax: prod, // Enable syntax minification in production
minifyWhitespace: prod, // Disable whitespace minification
minifyIdentifiers: prod, // Disable identifier minification
outdir,
define: {
"process.env.NODE_ENV": JSON.stringify(prod ? "production" : "development"),
},
minify: prod,
treeShaking: prod,
plugins: [
copy({
assets: {