📅  最后修改于: 2022-03-11 15:01:08.887000             🧑  作者: Mango
// In the Main.js file in electron
app.on('ready', () => {
mainWindow = new BrowserWindow({
// Add these lines of code and it should start working
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
}
});
});