I know I can add --js-flags="--max-old-space-size=4096"
when run it using electron. But Where should I put this param to the build config of electron-builder?
In main.js, add:
app.commandLine.appendSwitch('js-flags', '--max-old-space-size=4096');
According to Supported Chrome Command Line Switches, this should be called before the ready
event is emitted. For example:
import { app } from "electron";
app.commandLine.appendSwitch('js-flags', '--max-old-space-size=4096');
app.on('ready', () => {
// ...
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With