Closed linxu closed 6 years ago
Something else is certainly responsible for this. If you're using Webpack, use the BundleAnalyzerPlugin to determine what's adding this size to your output file. Also be aware that you can use the ASAR tool to unpack your app.asar file (or equivalent) and explore the contents.
i use electron-forge
I'm pretty certain electron-forge uses Webpack. In any event you can extract the contents of your ASAR file.
@linxu I also saw some unexpected electron dependencies being pulled in while using a slightly older electron. However, after I upgraded to electron to v2.0.7 things returned to normal.
So you could try to upgrade your electron-forge to the latest version.
Have had the same issue using electron-builder v20.28.2 to build with a reference to electron-json-storage.
This folder is introduced into the built output if I depend on electron-json-storage "\resources\app.asar.unpacked\node_modules\electron" - it seems to require electron as a dependency & hence causes the builder to include it in the app (Despite the fact it's already in there)...
@jviotti should electron
be a dependency here or a peerDependency?
@Slapbox @fyjham-ts That's absolutely correct. Thanks a lot for catching this! Do you want to send a PR? I'll approve and publish ASAP
@jviotti thanks for your quick response. I just sent over https://github.com/electron-userland/electron-json-storage/pull/115 .
I haven't tested it besides for invalid JSON, but I see no reason this shouldn't work.
cool
I published the fix as v4.1.2. I'll close this ticket now, but please let us know how it went :)
After depend on electron-json-storage, the exe or dmg becomes bigger. from 50M to 100M!