Electron distribution filesize


I want to release a very simple electron app (about 17 MB in js/css/assets) but the packaged osx app ends up being around 120 MB total. Is there a way to reduce this somehow?

Newbie: Is there any way to shrink app size?
Can we dynamically link to electron framework and avoid app bloat?

I guess everyone would love that. This has been actually asked before a lot about nwjs as well. Just look at the size of Chrome or how big are Apple updates. I know it’s a bit too much considering the small size of our apps, but the download size will be much smaller when you create dmg…


Wouldn’t it be possible to have Electron installed as some kind of shared library? That way, it would only have to be installed once on a computer, and distributed Electron applications would only be a few MBs because they don’t have to ship the Electron binaries anymore.


It would only have to be installed once for each Electron version that is used by an Electron application installed on a computer, because you’ll run into the Dependency Hell problem.

Example: if a user first installs ElectronAppOlder that uses ElectronOlder and later installs ElectronAppNewer that uses API introduced in ElectronNewer then you need to install ElectronNewer in addition to ElectronOlder. You cannot remove the ElectronOlder installation because some API might have changed and/or removed in ElectronNewer, which would break ElectronAppOlder.

Of course, in theory this would still be an improvement, but in practice I am not sure how often it would happen that a user installs multiple Electron applications that use exactly the same version.

I think a scenario in which an Electron application releases an update without actually updating to a new Electron version occurs more often. I don’t know how tightly Electron is integrated into an Electron application, but if it’s possible to only update the Electron application while keeping an already up-to-date Electron, the user would only have to pay the full price on first install and on every update thereafter where a new Electron version is required.


@petrsimon making a .dmg file does help. Good idea. But after the installation, the .app will still have the same distribution size, right? Like mine is just a simple ‘hello world’ app (from the quick starter template), and the .app is 108MB.


Someone attempting to use system web browser vs bundling in the package

Early days for the project but sounds very interesting despite risk of compatibility issues.


The risk of incompatibility issues just make me have nightmares. I recommend not to rely on something that you, as a developer, do not have control over. Never.

I honestly prefer to have apps that weights hundreds of MBs.