alex8088 / electron-vite

Next generation Electron build tooling based on Vite 新一代 Electron 开发构建工具,支持源代码保护
https://electron-vite.org
MIT License
3.57k stars 153 forks source link

yarn start(electron-vite preview)后,空白页面 #611

Closed afresh closed 2 months ago

afresh commented 2 months ago

Describe the bug

通过F12调试,发现控制台报错:Failed to load resource: net::ERR_FILE_NOT_FOUND,分别是index-6c1d9fb8.jsindex-c3fc1fbc.css文件找不到。

排查生成的out/renderer/index.html文件,发现路径../../../../../git/kad-tool-deskt/assets/index-6c1d9fb8.js不对,正确的应该是../../../../../git/kad-tool-desktop/assets/index-6c1d9fb8.js,不知道为什么路径会被截断?

Electron-Vite Version

1.0.27

Electron Version

25.6.0

Vite Version

4.4.9

Validations

afresh commented 2 months ago

code: https://github.com/afresh/kad-tool-desktop

afresh commented 2 months ago

没找到原因,重新创建项目,再迁移代码就没问题了。