All child routes in a single bundle?
Is it possible to include all child routes code in a single bundle. The generated bundle files for child routes are very small in size.
5 Replies
grumpy-cyan•10mo ago
At the moment no.
Currently, when using
automaticCodeSplitting, it splits each route by its Route content (loader and component).
It's done this way so that the initial bundle size on the users device is very low and it only requests the Route content when required.quickest-silverOP•10mo ago
@Tanner Linsley Any plans of adding this functionality?
grumpy-cyan•10mo ago
You could just turn off "automaticCodeSplitting" or not using the legacy
.lazy syntax. This'd bunch all of the code into a single bundle.quickest-silverOP•10mo ago
I still want to utilize code splitting but instead of ending up with tens of small bundles it will be better if we have the ability to group related code into one bundle.
Few years back i did similar to this in vue
quickest-silverOP•10mo ago
Vue Router
The official Router for Vue.js