This commit is contained in:
2025-09-30 23:10:13 +02:00
parent a646542d8f
commit 9938c1f9e2
27 changed files with 2158 additions and 498 deletions

View File

@@ -19,4 +19,32 @@ export default defineConfig(({ mode }) => ({
"@": path.resolve(__dirname, "./src"),
},
},
build: {
// Optimize build for better performance
rollupOptions: {
output: {
manualChunks: {
// Separate vendor chunks for better caching
'react-vendor': ['react', 'react-dom', 'react-router-dom'],
'ui-vendor': ['lucide-react', '@radix-ui/react-slot'],
'gsap-vendor': ['gsap'],
},
},
},
// Increase chunk size warning limit (GSAP is large)
chunkSizeWarningLimit: 1000,
// Enable minification and compression
minify: 'terser',
terserOptions: {
compress: {
drop_console: mode === 'production',
drop_debugger: mode === 'production',
},
},
},
// Optimize dependencies
optimizeDeps: {
include: ['react', 'react-dom', 'react-router-dom'],
exclude: ['gsap'],
},
}));