简体   繁体   English

SvelteKit 不加载登录页面(但所有其他页面......?)

[英]SvelteKit doesn't load landing page (but all other pages...?)

I have a weird issue with my SvelteKit Website: The landing page ('/') is not working, but all other pages are.我的 SvelteKit 网站有一个奇怪的问题:登录页面 ('/') 不工作,但所有其他页面都工作。

This is only happening when I build and run in production , otherwise all pages load normally:这只发生在我在生产中构建和运行时,否则所有页面都正常加载:

  • vite dev : Everything works normally vite dev : 一切正常
  • vite preview : Everything works normally vite preview : 一切正常
  • vite build && node build/ : Landing does not load, all other pages do. vite build && node build/ :登陆不加载,所有其他页面都加载。

See for yourself:你自己看:

I tried working out with curl what the problem could be, but if you curl the site, everything seems to work....我尝试用 curl 解决问题可能是什么,但如果你 curl 网站,一切似乎都可以工作......
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 .当我更新我的依赖项并且svelte-kit build变成vite build时,这个问题首先出现了。

I'd be happy for any help!我很乐意提供任何帮助!

The problem sovled itself: It seems this was an effect of SvelteKit in combination with vite v2.9.10.问题自行解决:这似乎是 SvelteKit 与 vite v2.9.10 结合使用的效果。
Once I updated vite to v3.0.0, the problem disappeared and everything worked again.一旦我将 vite 更新到 v3.0.0,问题就消失了,一切都恢复了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM