第一种是从 package.json 的 "build" 字段读取配置: "build": {"appId": "com.example.app","productName": "Your App","mac": {"category": "public.app-category.productivity"},"win": {"target": ["nsis", "portable"]},"linux": {"target": ["AppImage", "deb"]},"extraResources": [{...
//项目名 这也是生成的exe文件的前缀名"appId":"xxxxx","copyright":"xxxx",//版权信息"directories":{"output":"build"// 输出文件夹},"extraResources":[{// 需要读写的配置文件"from":"./config/config.json","to":"../config/config.json"}],"win":...
第一种是从 package.json 的 "build" 字段读取配置: "build":{"appId":"com.example.app","productName":"Your App","mac":{"category":"public.app-category.productivity"},"win":{"target":["nsis","portable"]},"linux":{"target":["AppImage","deb"]},"extraResources":[{"from":"assets/"...
//项目名 这也是生成的exe文件的前缀名"appId":"xxxxx","copyright":"xxxx",//版权信息"directories":{"output":"build"// 输出文件夹},"extraResources":[{// 需要读写的配置文件"from":"./config/config.json","to":"../config/config.json"}],"win":...
"extraResources": [{// 需要读写的配置文件 "from":"./config/config.json", "to":"../config/config.json" }], "win": { "icon":"xxx/icon.ico"//图标路径, "target":[ { "target":"nsis", "arch": ["x64"] } ] ...
"extraResources": [{ // 需要读写的配置文件"from": "./config/config.json", "to": "../config/config.json" }], "win": { "icon": "xxx/icon.ico"//图标路径, "target":[ { "target": "nsis", "arch": ["x64"] } ] }, ...
{"name":"my-electron","version":"0.1.0","author":"编程三昧","build":{// electron-builder配置"productName":"myFirstApp",//项目名 这也是生成的exe文件的前缀名"appId":"xxxxx","copyright":"xxxx",//版权信息"directories":{"output":"build"// 输出文件夹},"extraResources":[{// 需要读写的...
{"name":"my-electron","version":"0.1.0","author":"编程三昧","build":{// electron-builder配置"productName":"myFirstApp",//项目名 这也是生成的exe文件的前缀名"appId":"xxxxx","copyright":"xxxx",//版权信息"directories":{"output":"build"// 输出文件夹},"extraResources":[{// 需要读写的...
配置项不止可以配置不打包哪些文件或文件夹,也可以将制定目录的文件复制到指定的应用目录中,具体参考extraResources 上一篇Electron Build 打包后如果安装在CProgram Files目录的问题 下一篇tp5.1多条件组合查询 本文作者:makalo 本文链接:https://www.cnblogs.com/makalochen/p/14486514.html 版权声明:本作品采用知...
在这个示例中,我们配置了应用的唯一标识符(appId)、产品名称(productName)、输出目录(output)、不同操作系统下的图标(mac、win、linux)、额外资源文件(extraResources)、要包含的文件(files)以及更新配置(publish)。 测试与验证 配置完成后,你可以通过运行打包命令(如 npm run build 或yarn build)来测试配置文件的正...