routes bundle

This commit is contained in:
seb
2026-09-23 09:35:46 +02:00
parent c94ce20b7a
commit ab65fb4776

View File

@@ -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)\//,