This plugin will automatically add all native modules in your node_modules
folder to the asar.unpack
config option in your packagerConfig
. If you have any native modules as all you should probably use this to reduce loading times and disk consumption on your users' machines.
yarn add @electron-forge/plugin-auto-unpack-natives --dev
You must add this plugin to your plugins
array in your forge config
The complete config options are available at AutoUnpackNativesConfig
.
forge.config.jsmodule.exports = {plugins: [['@electron-forge/plugin-auto-unpack-natives']]}