kit
kit copied to clipboard
Add a hook to run some code during preloading code
Describe the problem
Some module is large, but not compatible with SSR. So I can only import it dynamically in an onMount
or if (browser)
block. But I still want them to be preloaded during that page got preloaded
by preloadCode
or data-sveltekit-preload-code
.
An example is monaco-editor
.
Describe the proposed solution
Add a hook like beforePreload
in $app/navigation
.
Alternatives considered
For now I can only write them in on:mouseover
besides data-sveltekit-preload-code
or write them after preloadCode
Importance
nice to have
Additional Information
No response