I have a weird issue with my SvelteKit Website: The landing page ('/') is not working, but all other pages are.
This is only happening when I build and run in production, otherwise all pages load normally:
vite dev
: Everything works normallyvite preview
: Everything works normallyvite build && node build/
: Landing does not load, all other pages do.
See for yourself:
- go to https://wildwaid.com/datenschutz: Page works!
- go to https://wildwaid.com/: Page doesn't work.
I tried working out with curl what the problem could be, but if you curl the site, everything seems to work....
It also is not a problem with the landing page itself, since even if I just put "Test" in the file, it still doesn't load.
The issue accured first, when I updated my dependencies and svelte-kit build
became vite build
.
I'd be happy for any help!
CodePudding user response:
The problem sovled itself:
It seems this was an effect of SvelteKit in combination with vite v2.9.10.
Once I updated vite to v3.0.0, the problem disappeared and everything worked again.