Prepare migration for sandboxing (path.join in preload)

This commit is contained in:
TC
2022-09-05 00:31:29 +02:00
parent 91e4433aba
commit 1f5f597561
4 changed files with 33 additions and 13 deletions

View File

@ -136,12 +136,12 @@ function createMainWindow() {
preload: path.join(__dirname, "preload.js"),
nodeIntegrationInSubFrames: true,
affinity: "main-window", // main window, and addition windows should work in one process
...(isTesting()
...(!isTesting()
? {
// Only necessary when testing with Spectron
contextIsolation: false,
nodeIntegration: true,
}
// Sandbox is only enabled in tests for now
// See https://www.electronjs.org/docs/latest/tutorial/sandbox#preload-scripts
sandbox: false,
}
: undefined),
},
frame: !is.macOS() && !useInlineMenu,