Giter Site home page Giter Site logo

Comments (6)

mmaietta avatar mmaietta commented on August 23, 2024 1

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.

beyondkmp avatar beyondkmp commented on August 23, 2024

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.

gweesin avatar gweesin commented on August 23, 2024

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.

xyloflake avatar xyloflake commented on August 23, 2024

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.

staniel359/muffon#173

from electron-builder.

xyloflake avatar xyloflake commented on August 23, 2024

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.

gweesin avatar gweesin commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.