This is a reproduction case for bug https://github.com/sveltejs/svelte-preprocess/issues/507.
It is based off of sveltekit with 1 added commit.
run npm run dev -- --open and open the index route to see the bug in action.
npm run dev -- --open