Вот моя конфигурация проекта и структуры электронного строителя:
build
icon.ico
icon.png
src
constants
electron-actions
main
main.js
preload.js
renderer
index.js
package.json:
{
"name": "appname",
"version": "1.0.5",
"description": "desc",
"license": "MIT",
"author": "TS",
"keywords": [
"Electron"
],
"build": {
"productName": "smart client",
"files": [
"src/main/preload.js",
"src/electron-actions/*,"
],
"nsis": {
"oneClick": true,
"installerIcon": "icon.ico",
"uninstallerIcon": "icon.ico"
}
},
"scripts": {
"dev": "electron-webpack dev",
"compile": "electron-webpack",
"dist": "yarn compile && electron-builder",
"dist:dir": "yarn dist --dir -c.compression=store -c.mac.identity=null"
},
"dependencies": {
"source-map-support": "^0.5.12"
},
"devDependencies": {
"electron": "8.0.1",
"electron-builder": "^22.3.2",
"electron-builder-squirrel-windows": "^22.3.3",
"electron-positioner": "^4.1.0",
"electron-squirrel-startup": "^1.0.0",
"electron-updater": "^4.2.0",
"electron-webpack": "^2.7.4",
"electron-window-state": "^5.0.3",
"electron-windows-badge": "^1.0.5",
"webpack": "4.41.6"
}
}
´´´