npm i
npm run dev
An Internal server error: window is not defined
error is thrown.
Replace the vite version in package.json
with 4.1.4
(the last release before 4.2.0
) and repeat the above steps. The site will load without issue.
I realise that this is perhaps a little niche, and I am not enitrely sure where in the chain this issue will exist, but this doesn't strike me as correct behaviour.
The guard against rendering anything on the server is deliberate for a specific use case I have for Safari. I only need to SSR in dev because of this issue: sveltejs/kit#7805.