Closed beckend closed 3 years ago
Can you elaborate what you are looking for from this feature? Solid currently supports lazy loading components and this works today with the router and to code split with popular build tools.
Oh, can you show some concrete code using this router?
I am talking about dynamic import statement, so if it's a big component, the bundles will be split.
You can read more about lazy, Suspense and transitions in the Solid docs, but here is a simple example that shows how they can be used with the router: https://codesandbox.io/s/solid-router-lazy-rgkjh
Essentially, you will import your component using a dynamic import via Solid's lazy
function. Then you can just use them a routes and they will load when the route is made active the first time. Wrapping your routes (usually the root most) in a suspense boundary will let you have nice transitions while waiting for the next route to load. Obviously this requires your bundler to handle the actual code-splitting on dynamic imports but that is pretty standard.
Ok thanks for your time to comment!
for codesplitting.