打包electron产生没有内容的空白页

Packaging electron produces blank page with no content

我使用 electron 构建了这个应用程序:https://github.com/harryingles/FRJumpCalc

但是我似乎无法将其打包到 exe 文件中 - 使用任何打包实用程序执行此操作都会在我打开它时导致空白页。

http://prntscr.com/hutb0j

这是我的第一个 Electron 项目。

编辑:我安装了一个模块来打开 Dev Tools: 并在 运行 打包 exe 文件中的应用程序时收到以下错误消息 -

不允许加载本地资源:file:///views/index.html

我通过以下方式解决了这个问题:

将页面的路径名更改为 __dirname + "build/index.html"

并添加

”文件:[ "build", "*.js", "public"]

到我的 package.json(如果有人需要,它不会在 github 仓库中更新)