Lazy loading routes instead of components
Hi,
I'd like to have a separate file for each main route, but I'm not sure how to do that using lazy
those are my routes.
What I'd imagine is a file for homepage. privacy, tos, shards, commands, then profile but that should include also its subroutes, same with admin and blogs and dashboard.
How can I lazy load several components at once?
1 Reply
If you want the bundler to group all the "child routes" together for the parent route, you may be able to have a separate
<Routes>
section (for the child routes) within the lazy-loaded parent component, and just don't use lazy for the child routes inside there.