Solid Router - Lazy import section of site in one bundle / lazy add routes
I'm using the Solid Router and have sections of the site that are "First Time Users" or "Settings Pages" that are big pieces of the site but I'd like to lazy load them as one bundle. Is there a way to section off the Routes so
const FTI = lazy(() => import("./pages/FTI"));
<Route path="/fti" component={FTI}>
FTI component could have many imports for other components and add to the router additional routes not defined in the index? Now that I'm asking this I think my question is can my index page have Router and then inside of a lazy loaded Page I can add additional Routes?
Thanks.
3 Replies
Where FTI would have additional sub routes and pages....
<Route path={'/language-select'} component={SelectLanguagePage} />
<Route path={'/select-setup'} component={SelectSetupPage} />
you could try
and in your pages/FTI put
users_and_settings.ts
router
Creates 1 chunk