sveltekit-offline-preload-bug Svelte Themes

Sveltekit Offline Preload Bug

repro of a bug in Sveltekit where you go offline and hovering over a link triggers a hard navigation

sveltekit-offline-preload-bug

This repo documents a bug that happens in extremely adverse network conditions when the root layout has a server load().

  1. npm install
  2. npm run dev
  3. Open up http://localhost:5173 in Chrome (this is most straightforward in Chrome)
  4. In the command palette (CMD + SHIFT + P), choose Go Offline
  5. Hover over the Sverdle link in the nav. In a flash, SvelteKit will do a hard navigation tohttp://localhost:5173/sverdle, which will fail because you're offline

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes