Jul 11, 2021
window.require('electron') was not working. require('electron') also. Only worked when in webPreferences set not only nodeIntegration:true, enableRemoteModule: true but also contextIsolation: false.
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true,
contextIsolation: false,
},
hopefully that helps for other readers. Great guide.