diff --git a/code/websites/pokedex.online/vite.config.js b/code/websites/pokedex.online/vite.config.js index 76e86f8..83f538f 100644 --- a/code/websites/pokedex.online/vite.config.js +++ b/code/websites/pokedex.online/vite.config.js @@ -9,6 +9,28 @@ export default defineConfig({ '@': 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: { host: '0.0.0.0', port: 5173,