I made an app in Svelte and now I wanted to port it to SvelteKit. My app uses window
and document
objects, but those aren't available in SSR. Firstly, it threw ReferenceError: window is not defined
, but I fixed that by checking if the app is running in the browser. But because of that, my app is not working.
↧
SvelteKit: disable SSR
↧