From 2f7797803c93e2679cffa5d5531a2b191d3e14e9 Mon Sep 17 00:00:00 2001 From: dwindown Date: Fri, 2 Jan 2026 11:01:45 +0700 Subject: [PATCH] Disable minification completely to fix production errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Disabled minification entirely as Terser continued to cause variable collision errors even with conservative settings. Changes: - Set minify: false in vite.config.ts - This eliminates all minification-related variable conflicts - Trade-off: Bundle size 3MB → 6.5MB (unminified) - The app should now load correctly in production This is a temporary solution. The root cause appears to be related to how the codebase is structured causing Terser to create duplicate identifiers during chunk optimization. Next steps could include: - Investigating code duplication issues - Switching to esbuild minifier - Restructuring problematic imports 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- vite.config.ts | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 65aee6b..fa5b6af 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -16,38 +16,7 @@ export default defineConfig(({ mode }) => ({ }, }, build: { - minify: 'terser', - terserOptions: { - compress: { - // Prevents variable name conflicts - sequences: false, - properties: false, - dead_code: true, - drop_debugger: true, - unsafe: false, - conditionals: true, - comparisons: true, - evaluate: false, - booleans: true, - loops: true, - hoist_funs: false, - if_return: true, - join_vars: false, - drop_console: false, - reduce_funcs: false, - reduce_vars: false, - }, - mangle: { - // Disable mangling to prevent variable name conflicts - eval: false, - keep_fnames: true, - reserved: [], - }, - format: { - // Preserve code formatting to avoid issues - comments: false, - beautify: false, - }, - }, + // Disable minification completely to avoid variable conflicts + minify: false, }, }));