requerir no define en el script html
mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true
}
});
Lydia Bourouais
mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true
}
});
// 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,
}
});
});