From cbb3b10fb2f63f99180b5e69f3fdcbc9fe1accfc Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 11 Feb 2019 15:05:31 -0800 Subject: [PATCH] fix: specify nodeIntegration=true for Electron 5 compat (#257) --- main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 3fa4035..b64ad2b 100644 --- a/main.js +++ b/main.js @@ -7,7 +7,13 @@ let mainWindow function createWindow () { // Create the browser window. - mainWindow = new BrowserWindow({width: 800, height: 600}) + mainWindow = new BrowserWindow({ + width: 800, + height: 600, + webPreferences: { + nodeIntegration: true + } + }) // and load the index.html of the app. mainWindow.loadFile('index.html')