I just recently built an electron app and packaged it using electron-packager. The .exe file is 55,000kb and the rest of the folder is quite bulky as well. Is there any way to take down the size of this application at all?
相关问题
- How can I get a window object from new BrowserWind
- Failed at the electron@1.8.2 postinstall script
- No member named ForceSet
- Export HTMLtable to CSV in electron
- Using electron-usb with electron
相关文章
- Configuring electron-webpack renderer to work with
- Error messages and console logs in Electron?
- Adding Apple in-app purchase to Electron HTML/JS a
- Minimal Example: Opening a window in electron from
- Electron dying without any information, what now?
- Electron without GUI
- Testing Electron application with org.openqa.selen
- How to build the Electron application for the Wind
A somewhat helpful post from that github thread suggests removing unnecessary node modules via electron-packager. It also offers a bit more explanation on why files are so large.
There is a way to reduce Electron size drastically (up to 99%, depending how big is your app), by using native browser, available in each OS, instead of loading webkit. BUT as built in browsers don't have the system API's, you will also be drastically limited in what you can do. But, if you need basic web ui app, this might be the best solution out there, though, it must be mentioned, that it might have some unexpected issues, as you will need to test your app on different OS'es browsers..
The method i'm talking about is available in awesome post Put your Electron app on a diet with Electrino by
Pauli Olavi Ojala
Here's a github issue on it.
The comment I'm emphasizing is:
The reason why it's so big is because electron is loading most of chromium inside that 50mb file.
So no unfortunately there is no way to make it smaller sorry.