diff --git a/frontend/package.json b/frontend/package.json index 9e1677c..8b82d1e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -20,6 +20,7 @@ }, "dependencies": { "choices.js": "^10.2.0", - "d3": "^7.8.5" + "d3": "^7.8.5", + "terser": "^5.21.0" } } diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 8ccb8a1..b3ac55c 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -14,6 +14,12 @@ export default defineConfig({ ], publicDir: false, // disable copy `public/` to outDir build: { + minify: 'terser', // Explicitly specify to use terser for minification + terserOptions: { + mangle: false, // Disable variable name mangling + keep_classnames: false, + keep_fnames: false, + }, rollupOptions: { input: { main: './main.ts', @@ -32,4 +38,4 @@ export default defineConfig({ css: { devSourcemap: true, // disabled by default because of performance reasons }, -}) \ No newline at end of file +})