Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After depend on electron-json-storage, the exe or dmg becomes bigger. from 50M to 100M! #114

Closed
linxu opened this issue Aug 16, 2018 · 10 comments

Comments

@linxu
Copy link

linxu commented Aug 16, 2018

After depend on electron-json-storage, the exe or dmg becomes bigger. from 50M to 100M!

@Nantris
Copy link
Contributor

Nantris commented Aug 20, 2018

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.

@linxu
Copy link
Author

linxu commented Aug 21, 2018

i use electron-forge

@Nantris
Copy link
Contributor

Nantris commented Aug 21, 2018

I'm pretty certain electron-forge uses Webpack. In any event you can extract the contents of your ASAR file.

@wduminy
Copy link

wduminy commented Aug 23, 2018

@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.

@fyjham-ts
Copy link

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)...

@Nantris
Copy link
Contributor

Nantris commented Aug 25, 2018

@jviotti should electron be a dependency here or a peerDependency?

@jviotti
Copy link
Member

jviotti commented Aug 25, 2018

@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

@Nantris
Copy link
Contributor

Nantris commented Aug 25, 2018

@jviotti thanks for your quick response. I just sent over #115 .

I haven't tested it besides for invalid JSON, but I see no reason this shouldn't work.

@linxu
Copy link
Author

linxu commented Aug 26, 2018

cool

@jviotti
Copy link
Member

jviotti commented Aug 26, 2018

I published the fix as v4.1.2. I'll close this ticket now, but please let us know how it went :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants