diff --git a/vite.config.js b/vite.config.js index 7e3760a..7cc08f7 100644 --- a/vite.config.js +++ b/vite.config.js @@ -162,6 +162,15 @@ export default defineConfig(({ command }) => ({ output: { codeSplitting: { groups: [ + { + // Consolidate every lazy(() => import('./pages/...')) route + // module into ONE chunk so we don't ship ~30 tiny 0.1–0.4 kB + // files. Still loaded on first route navigation (not on the + // initial bundle). For per-section chunks instead, replace this + // with groups matching /\/src\/pages\/(artikel|lieferung|...)\//. + name: 'routes', + test: /\/src\/pages\//, + }, { name: 'react-vendor', test: /node_modules\/(react|react-dom|react-router|react-router-dom|scheduler)\//,