There was a breaking change in electron. the "nodeIntegration" flag is now default to false. You need to set it to true as it inserts "require" into the DOM. So add this to your BrowserWindow:
mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true
}
});
There was a breaking change in electron. the "nodeIntegration" flag is now default to false. You need to set it to true as it inserts "require" into the DOM. So add this to your BrowserWindow:
mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true
}
});
thx Johannes,
it works like a charm.