I can't share a full repo as that's against company policies, but I can give some background.
The App is an existing SPA that we're migrating to Start, so we know what the historic bundle sizes are/were.
Historically we only had a couple of chunks:
- The main UI library the App uses (the UI library doesn't support tree shaking, and is used by every route).
- A couple of one-off large components that aren't widely used, loaded with React.lazy
- The main App bundle itself, including all routes. Most routes are relatively small as there is a lot of shared code, and the App leans heavily on the UI library from #1
The reason for not wanting per-route code splitting is that it just doesn't serve a useful purpose - there's not really much code to split! The UI library needs to be in a single chunk, and most of the application code is used by most routes.
The downside of code splitting is that it makes the UX a lot worse, as with a cold cache there's a noticeable delay while navigating to new routes, which don't have loaders, as the route js needs to be loaded first, even though 99% of the code required for the route (eg. the UI library, localization, API framework, etc..) is already availablein the client cache