zeromq / zeromq.js

:zap: Node.js bindings to the ØMQ library
http://zeromq.github.io/zeromq.js/
MIT License
1.47k stars 211 forks source link

zeromq.js in the Electron package is too big #422

Open kakyoism opened 4 years ago

kakyoism commented 4 years ago

Describe the bug

zeromq works fine with my Electron-based app, but the packaging pipeline picks up the entire node_modules/zeromq folder, which amounts to over 100MB. I wonder how to quickly exclude the intermediate product and source, only reserve the necessary binary and JS/TS bindings

Reproducing

I use yarn to build my electron app this way

yarn create electron-app my-app
cd my-app
yarn add zeromq
yarn make

This generates a functional app, but carries with it all the zeromq bag built by nodegyp

zeromqjs-electron-node_modules

Expected behavior

I expect the zeromq.js build pipeline would exclude intermediate files at the end.

Tested on

trusktr commented 4 years ago

This may not be a problem specific to zeromq.js, but more of an Electron problem. You might get more help with this in Electron's repo, or at https://discuss.atom.io/c/electron. Zeromq.js does what it does, for Node. Then Electron packaging is a whole other thing.