Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A solution to the white screen application problem packaged with basic templates #44

Open
XunJiJiang opened this issue Jul 17, 2024 · 0 comments

Comments

@XunJiJiang
Copy link

Modify the code in "else logic" in line 45 of "electron/main.ts" to "win.loadFile('dist/index.html')."

In the electron document, the first parameter of "win.loadFile" is described as: it should be a path to an HTML file relative to the root of your application.

Here you need to point the path to the HTML file built by vite.

将“electron/main.ts”中,第45行“else逻辑”中的代码修改为“win.loadFile('dist/index.html')”。

electron文档中,对“win.loadFile”的第一个参数的描述为:必须是一个相对于你的应用程序根目录的HTML文件路径。

这里需要将路径指向由vite构建后的HTML文件。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant