kit icon indicating copy to clipboard operation
kit copied to clipboard

Use `preloadCode()` to prefetch code for all routes

Open neunato opened this issue 2 years ago • 0 comments

Describe the problem

Prior to v1.0, calling prefetchRoutes() without arguments would prefetch all routes.

This functionality is no longer present with preloadCode() and it is not clear from the migration guide.

It was a nice feature for smaller sites and while data-sveltekit-preload-code may be used for the same purpose, having manual control over it can be useful - to, for example, initiate the downloads after a delay to give some time for the initial page load.

Describe the proposed solution

Calling preloadCode() without arguments should import the code for all routes.

Alternatives considered

No response

Importance

would make my life easier

Additional Information

No response

neunato avatar Jan 11 '23 21:01 neunato