我已经使用webpack将我们的ReactJS应用程序迁移到Electron Forge。现在我已经创建了.exe文件,但由于缺少latest.yml
文件,我正在与electron-updater
斗争。我如何使用electron-forge make
创建此文件,以便electron-updater
可以更新应用程序?
package.json
{
"name": "app-electron",
"version": "1.5.3",
"description": "My app description",
"config": {
"forge": {
"plugins": [
{
"name": "@electron-forge/plugin-webpack",
"config": {
"devContentSecurityPolicy": "default-src * self blob: data: gap:; style-src * self 'unsafe-inline' blob: data: gap:; script-src * 'self' 'unsafe-eval' 'unsafe-inline' blob: data: gap:; object-src * 'self' blob: data: gap:; img-src * self 'unsafe-inline' blob: data: gap:; connect-src self * 'unsafe-inline' blob: data: gap:; frame-src * self blob: data: gap:;",
"mainConfig": "./webpack.main.config.js",
"renderer": {
"config": "./webpack.renderer.config.js",
"entryPoints": [
{
"name": "main_window",
"html": "./src/index.html",
"js": "./src/index.js",
"preload": {
"js": "./src/preload.js"
}
}
]
}
}
}
],
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "app-electron",
"loadingGif": "loading.gif",
"icon": "icon.ico"
}
}
]
}
},
...
}
字符串
1条答案
按热度按时间c9qzyr3d1#
electron-forge
不会自动创建latest.yml
文件,在最后有一个我的文件的例子,所以你可以手动创建它,但强烈建议使用electron-builder,而不是正确创建丢失的文件,并反过来正确拾取电子更新程序,即。字符串