Bundle lazy load
Is it possible to bundle the lazy loads? So when I hit any route under /admin - all of the other admin route components also gets lazy loaded?
7 Replies
lazy
adds a .preload
function to its result, maybe you could call them in the /admin
load function?What do you mean by call them in the /admin load function?
add a load function to
/admin
route and call them in thereGitHub
GitHub - solidjs/solid-router: A universal router for Solid inspire...
A universal router for Solid inspired by Ember and React Router - solidjs/solid-router
I've tried to do it like this, but it doesn't seem to work. Maybe that's not what you meant?
You're halfway there, put the lazy imports back where you had them and call
preload
on each one you want preloadedAh yes now it works! Thanks for the help 😎