From ab65fb47766f50de61b9b128900db012cc0ad277 Mon Sep 17 00:00:00 2001 From: seb Date: Wed, 23 Sep 2026 09:35:46 +0200 Subject: [PATCH] routes bundle --- vite.config.js | 9 +++++++++ 1 file changed, 9 insertions(+) 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)\//,