Comments (6)
If you want the size to be reduced, I'd recommend removing the unnecessary locales for electron.
This should already be supported via electronLanguages
string array 🙂
https://www.electron.build/configuration/configuration
from electron-builder.
The asar
file needs to include node_modules, but it will only include the dependencies listed in your project's package.json and their dependencies. If you directly filter out all of node_modules, the code may not run unless you've bundled all the dependency code into the dist folder.
from electron-builder.
Could I consider that all projects need to be bundled? Otherwise the app will contain the electron package in node_modules, it's about 256MB and it's duplicated and not used.
from electron-builder.
Could I consider that all projects need to be bundled? Otherwise the app will contain the electron package in node_modules, it's about 256MB and it's duplicated and not used.
If you want the size to be reduced, I'd recommend removing the unnecessary locales for electron.
Here's how I patched electron-builder to only include the English locale unless specified otherwise. This resulted in a 38MB unpackaged app size decrease.
from electron-builder.
Otherwise the app will contain the electron package in node_modules, it's about 256MB and it's duplicated and not used.
Electron package in node modules is NOT a duplicate. It provides bindings to call the electron application through js. If you remove them, you won't be able to call the ABI methods through JS like you do. For example creating a new BrowserWindow.
The other electron package you're referring to provides the ABI through which the node js electron package can call methods that have been defined in the ABI.
from electron-builder.
I have tried ignore node_modules directly, nothing happened.
and try to configure electronLanguages, then the package bundle size reduce.
from electron-builder.
Related Issues (20)
- Add getting release notes in PrivateGitHubProvider
- GitHubProvider: Doesn't use custom channel that was set in the electron-builder config HOT 3
- ESM Config filetype causes import issues in external dep (pkg read-config-file) HOT 6
- trailing commas in dependency package.json cause havok HOT 2
- Linux deb auto updater doesn't update due wrong install command HOT 14
- Building large electron app >= 4.2Gib HOT 2
- Cannot include `node_modules/*/examples/**/*`? HOT 7
- Large Apps Result in Malformed NSIS Installer After Build - No Error(s) HOT 5
- local dependencies (file:path instead of version) are not included in app.asar HOT 6
- Cannot reuse icon for different file associations
- Building 64bit installer, portable exe in windows HOT 1
- MSI Build Failure
- [NSIS] After adding 'nsis.menuCategory' in config, an upgrade will still install app to old path
- Signing on MacOS using Azure Key Vault HOT 1
- Shortcut not found on Windows after install HOT 1
- Issue with hdiutil when building on MacOS HOT 2
- Semantic Versioning Compare Error
- code has no resources but signature indicates they must be present HOT 3
- AppImage fails if fileAssociations.ext is array
- Linux Icon Not Being Included When Building deb
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-builder.