diff --git a/main.js b/main.js index 8405e5ac8..97c28b79d 100644 --- a/main.js +++ b/main.js @@ -1,10 +1,11 @@ const { app, ipcMain, BrowserWindow, screen } = require('electron') +const remote = require('@electron/remote/main') const fs = require('graceful-fs'); const path = require('path') const os = require('os') const url = require('url') -require('@electron/remote/main').initialize() +remote.initialize() app.commandLine.appendSwitch('--enable-precise-memory-info'); @@ -96,7 +97,7 @@ function createMainWindow() { } }) - require('@electron/remote/main').enable(mainWindow.webContents) + remote.enable(mainWindow.webContents) // and load the index.html of the app. mainWindow.loadURL(url.format({ @@ -145,7 +146,7 @@ function createBackgroundWindows() { } }); - require('@electron/remote/main').enable(back.webContents) + remote.enable(back.webContents) if (process.env["deepnest_debug"] === '1') back.webContents.openDevTools(); diff --git a/package.json b/package.json index cbae780d4..dac201dd7 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "@electron/packager": "^18.3.6", "@electron/rebuild": "^3.2.9", "@types/node": "^22.10.1", - "electron": "^19.1.9", - "nan": "^2.22.0", + "electron": "31.7.6", + "nan": "^2.20.0", "shx": "^0.3.4" }, "dependencies": {