From c91a32967642620e40fe5135d81fc6019f0fd9b8 Mon Sep 17 00:00:00 2001 From: philipp Date: Thu, 12 Oct 2023 11:54:02 +0200 Subject: [PATCH] fix js error --- frontend/package.json | 3 ++- frontend/vite.config.js | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) 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 +})