今天想测试下,把一个现有的网站通过 electron 打包成一个桌面客户端,所以我直接在 main.js 文件中加载 url,项目结构如下:
package.json 内容如下:
{
"name": "saleorder-electron",
"version": "1.0.0",
"description": "saleorder-electron",
"main": "main.js",
"scripts": {
"start": "electron .",
"build": "electron-builder"
},
"keywords": [
"saleorder"
],
"author": "varkai",
"license": "ISC",
"devDependencies": {
"electron": "^11.2.0",
"electron-builder": "^22.9.1"
},
"build": {
"productName": "test",
"appId": "com.varkai.saleorder-electron",
"win": {
"icon": "favicon.ico",
"target": [
"nsis",
"zip"
]
}
}
}
通过electron .
是可以启动成功的,但是用 electron-builder 打包后,双击 exe 就没有任何反应了。
1
nojsja 2021-01-28 15:35:19 +08:00
从命令行启动.exe ,看看报什么错
|
2
showarp 2021-04-07 19:44:56 +08:00
你好解决了嘛,点击之后有残留进程嘛
|