From f1b1bd4111eb70b5b36120d9352a54b69879e8b5 Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Thu, 28 Aug 2025 20:09:57 +0200 Subject: [PATCH] webapp: Configure additional compression --- webapp/vite.config.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/webapp/vite.config.ts b/webapp/vite.config.ts index c82b4752..9c621508 100644 --- a/webapp/vite.config.ts +++ b/webapp/vite.config.ts @@ -45,6 +45,15 @@ export default defineConfig(({ command }) => { return { outDir: '../webapp_dist', emptyOutDir: true, minify: 'terser', + terserOptions: { + compress: { + drop_console: true, + drop_debugger: true, + }, + format: { + comments: false, + }, + }, chunkSizeWarningLimit: 1024, rollupOptions: { output: { @@ -58,9 +67,6 @@ export default defineConfig(({ command }) => { return { }, target: 'es2022', }, - esbuild: { - drop: command !== 'serve' ? ['console', 'debugger'] : [] - }, css: { preprocessorOptions: { scss: {