fix js error

This commit is contained in:
philipp 2023-10-12 11:54:02 +02:00
parent 1581570d97
commit c91a329676
2 changed files with 9 additions and 2 deletions

View File

@ -20,6 +20,7 @@
}, },
"dependencies": { "dependencies": {
"choices.js": "^10.2.0", "choices.js": "^10.2.0",
"d3": "^7.8.5" "d3": "^7.8.5",
"terser": "^5.21.0"
} }
} }

View File

@ -14,6 +14,12 @@ export default defineConfig({
], ],
publicDir: false, // disable copy `public/` to outDir publicDir: false, // disable copy `public/` to outDir
build: { build: {
minify: 'terser', // Explicitly specify to use terser for minification
terserOptions: {
mangle: false, // Disable variable name mangling
keep_classnames: false,
keep_fnames: false,
},
rollupOptions: { rollupOptions: {
input: { input: {
main: './main.ts', main: './main.ts',
@ -32,4 +38,4 @@ export default defineConfig({
css: { css: {
devSourcemap: true, // disabled by default because of performance reasons devSourcemap: true, // disabled by default because of performance reasons
}, },
}) })