️ Optimize production build configuration with chunk splitting, source maps, and increased asset limits

This commit is contained in:
2026-01-29 13:50:07 +00:00
parent af7155f483
commit 7fdc6e33f4

View File

@@ -9,6 +9,28 @@ export default defineConfig({
'@': fileURLToPath(new URL('./src', import.meta.url)) '@': fileURLToPath(new URL('./src', import.meta.url))
} }
}, },
build: {
// Production build optimizations
target: 'es2015',
minify: 'terser',
sourcemap: true, // Enable source maps for production debugging
rollupOptions: {
output: {
manualChunks: {
// Split vendor chunks for better caching
'vue-vendor': ['vue', 'vue-router'],
'highlight': ['highlight.js'],
'virtual-scroller': ['vue-virtual-scroller']
}
}
},
// Increase chunk size warning limit (default is 500kb)
chunkSizeWarningLimit: 600,
// Enable CSS code splitting
cssCodeSplit: true,
// Asset inlining threshold (10kb)
assetsInlineLimit: 10240
},
server: { server: {
host: '0.0.0.0', host: '0.0.0.0',
port: 5173, port: 5173,