orbitdb-archive / orbit

A distributed, serverless, peer-to-peer chat application on IPFS
MIT License
1.64k stars 117 forks source link

Ship Electron build with smaller disk footprint #215

Open haadcode opened 7 years ago

haadcode commented 7 years ago

Currently the electron build is ~300MB! :O

There's various reasons for that, but looking at some of the biggest disk space consumers:

libp2p-* ~40MB wrtc 11MB typescript 21MB ipld-resolver 5MB ipfs-daemon 8MB core-js 6.6MB ipfs-api 5.8MB

And in total the node.js dependencies in node_modules are ~200MB. Crazy.

The build process calls npm install --prodution to exclude all dev dependencies, but obviously that still pulls in a lot of unnecessary files.

We should reduce the disk footprint as much as possible.

Two options as of today:

Would love to hear about other options, strategies and tools we can use to get rid of megabytes of extra and slimming the Orbit Electron build as much as possible.