Skip to content

Commit

Permalink
Disable ContextIsolation in Electron 12 so that require can be used i…
Browse files Browse the repository at this point in the history
…n the renderer Process
  • Loading branch information
Andy Bradford committed Apr 25, 2021
1 parent b178f85 commit 0e9f4e1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/electronMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function createWindow(): void {
height: 560,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true,
preload: path.join(__dirname, '/preload.js'),
},
Expand Down

0 comments on commit 0e9f4e1

Please sign in to comment.