Ability to disable hydration and client routing on error pages #1942
Labels
bug
Something isn't working
p2-nice-to-have
SvelteKit cannot be used by a small number of people, quality of life improvements, etc.
Describe the problem
Currently, it is not possible to disable hydration and client routing for error pages. Error pages are arguably one of the best candidates for 0kB JS delivery when SSR'd, because in many cases they do not need to include any JS-powered interactivity.
This very basic error page on a fresh kit install:
In production mode using adapter-node takes nearly 8 seconds to load on simulated Slow 3G, with a small data URI favicon embedded into app.html to prevent a favicon request. On 6x CPU slowdown on my computer it takes over 700ms to process the useless clientside JS. 11.4 kB of the total 12.8 kB transferred was for JS alone.
Describe the proposed solution
SvelteKit should respect the
hydrate
androuter
exports of the__error.svelte
page.Alternatives considered
Since
__error.svelte
is a core part of kit, there's not really a good user alternative.Importance
Depends on usage - could be critical in particular regions of the world.
The text was updated successfully, but these errors were encountered: