Implemented method to turn off sandbox mode when the app is running in node env

This commit is contained in:
Kiran Niranjan 2017-07-06 18:05:36 +05:30 committed by Kiran Niranjan
parent 586b569864
commit 654441ce8c
2 changed files with 4 additions and 4 deletions

View File

@ -131,8 +131,8 @@ let config = {
acceptFirstMouse: true,
webPreferences: {
preload: path.join(__dirname, 'electron-notify-preload.js'),
sandbox: true,
nodeIntegration: false
sandbox: !process.env.NODE_ENV,
nodeIntegration: process.env.NODE_ENV
}
}
}

View File

@ -80,8 +80,8 @@ function doCreateMainWindow(initialUrl, initialBounds) {
minHeight: MIN_HEIGHT,
alwaysOnTop: false,
webPreferences: {
sandbox: true,
nodeIntegration: false,
sandbox: !process.env.NODE_ENV,
nodeIntegration: process.env.NODE_ENV,
preload: preloadMainScript,
}
};