Home > front end >  SvelteKit doesn't load landing page (but all other pages...?)
SvelteKit doesn't load landing page (but all other pages...?)

Time:07-26

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 normally
  • vite preview: Everything works normally
  • vite build && node build/: Landing does not load, all other pages do.

See for yourself:

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.

  • Related