Commit Graph

3 Commits

Author SHA1 Message Date
dwindown
877223342e Fix production build variable collision with safer Terser config
Disabled aggressive Terser optimizations that were causing variable
name conflicts (like 'xL' and 'Hf' already declared errors).

Changes:
- Disabled sequences, properties, and join_vars optimizations
- Disabled reduce_funcs and reduce_vars to prevent variable mangling
- Disabled hoist_funs to prevent scope issues
- Disabled evaluate to prevent constant folding issues
- Set keep_fnames: true to preserve function names
- This trades some bundle size (3MB → 3.2MB) for stability

The app should now load correctly in production without minification errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-02 10:56:35 +07:00
dwindown
0d1f8d795e Fix production build minification error causing blank page
Fixed the "Identifier 'xL' has already been declared" error that occurred
in production builds by switching from SWC minifier to Terser.

Changes:
- Updated vite.config.ts to explicitly use Terser minifier
- Added terser as dev dependency
- Configured safe Terser options to prevent variable name conflicts
- Disabled unsafe optimizations that can cause identifier collisions

This resolves the blank page issue in production while maintaining
bundle size optimization.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-02 10:47:10 +07:00
Lovable
bebc3a2029 template: new_style_vite_react_shadcn_ts 2025-01-01 00:00:00 +00:00