A minimal repo showing issue with loading JS in svelte:head component to test: npm install npm run dev -- --open go to /other click link (it takes you to /) Observe that Stripe() isn't available in onMount even though it is on SSR