výkon: manualChunks vendor knihoven a lazy route komponenty

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dusan Vojacek
2026-06-11 14:22:05 +02:00
parent 90f79d9abe
commit 7c2669def6
2 changed files with 43 additions and 10 deletions

View File

@@ -24,6 +24,17 @@ export default defineConfig(async () => {
outDir: 'dist',
assetsDir: 'assets',
chunkSizeWarningLimit: 750,
rollupOptions: {
output: {
// Stabilní vendor chunky: react jádro, grafové knihovny zvlášť (cache + menší initial load).
manualChunks: {
'vendor-react': ['react', 'react-dom', 'react-router-dom'],
'vendor-recharts': ['recharts'],
'vendor-nivo': ['@nivo/core', '@nivo/sankey'],
'vendor-chartjs': ['chart.js'],
},
},
},
},
server: {
proxy: {