电子积累器app尺寸太大

出门莫恨无人随,书中车马多如簇。这篇文章主要讲述电子积累器app尺寸太大相关的知识,希望能为你提供帮助。
我发现使用电子构建器生成的MyApp.exe文件几乎约为500M。我不知道我做了什么,因为以前,只是对于ia32或x64,它将是大约196M。我也看了这个link,它只提到大约55MB-60MB。所以问题是,为什么我的exe文件的大小如此之大?我的应用程序本身非常小,如果电子只有大约33MB,那么那里有多余的空间呢?
这是我的package.json条目:

"build": { "appId": "com.electron.myApp", "publish": [ { "provider": "generic", "url": "https://myAppServer" } ], "win": { "target": [ { "target": "nsis", "arch": [ "ia32" ] } ] }, "asar": false, "nsis": { "oneClick": true, "perMachine": false, "artifactName": "${productName}-Setup-${version}.${ext}"} "devDependencies": { "electron": "^1.7.9", "electron-installer-windows": "^0.2.0", "electron-builder": "^19.45.5", "electron-packager": "^8.5.2", "electron-winstaller": "^2.5.2", "grunt-electron-installer": "^2.1.0" }, "dependencies": { "auto-launch": "^5.0.1", "cron": "^1.2.1", "electron-config": "^0.2.1", "electron-positioner": "^3.0.0", "electron-squirrel-startup": "^1.0.0", "electron-window": "^0.8.1", "electron-updater": "^2.16.1", "fs": "^0.0.1", "homedir": "^0.6.0", "https": "^1.0.0", "https-proxy-agent": "^1.0.0", "line-by-line": "^0.1.5", "pac-proxy-agent": "^1.0.0", "url": "^0.11.0", "winreg": "^1.2.3", "xml2js": "^0.4.17" } }

【电子积累器app尺寸太大】这是电子应用程序的预期大小吗?有什么办法让这个更小?
此致,阿伦
答案你可以尝试npm prune --production,但即使是最小的电子应用也将大约100MB。

    推荐阅读