4 ms·
Usually people copy most of the node_modules over. Ideally it should be run through webpack/etc and only a bundled, minimized version of the app is shipped. In
by crucialfelix 10y ago
Usually people copy most of the node_modules over.
Ideally it should be run through webpack/etc and only a bundled, minimized version of the app is shipped. In practice some modules may have native compiled addons.
I'm working on an app right now and it ships at 247MB which is way too big.
release/darwin-x64/PlaySPLOM-darwin-x64/PlaySPLOM.app/Contents
107M ./Frameworks
12K ./MacOS
81M ./Resources
52M ./Resources/app/node_modules
- crucialfelix 10y agorelated: I realized that many people including myself made mistakes with .npmignore and accidentally include docs directories. that is a lot of bloat. a node module should be just runtime required code and LICENSE
- justncase80 10y ago^ This. Setup your .npmignore before publishing! Also, before packaging your Electron app use something like gulp to exclude problematic files like .md and anything else unnecessary. There are other common tools like browserify that can still be leveraged.