diff --git a/backend/main.ts b/backend/main.ts index 5c00dda..a92661c 100644 --- a/backend/main.ts +++ b/backend/main.ts @@ -22,15 +22,6 @@ class AppUpdater { } } -if (electronIsDev) { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { default: electronDebug } = await import('electron-debug') - electronDebug({ - showDevTools: true, - devToolsMode: 'right', - }) -} - const installExtensions = async () => { /** * NOTE: @@ -80,6 +71,9 @@ const spawnAppWindow = async () => { appWindow.maximize() appWindow.setMenu(null) appWindow.show() + + if (electronIsDev) appWindow.webContents.openDevTools({ mode: 'right' }) + appWindow.on('closed', () => { appWindow = null }) diff --git a/package.json b/package.json index c0fc390..0ae47c5 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,6 @@ "concurrently": "^8.2.2", "electron": "^30.0.5", "electron-builder": "^24.13.3", - "electron-debug": "^3.2.0", "electron-devtools-installer": "^3.2.0", "eslint": "^8.57.0", "eslint-config-next": "^14.2.3", diff --git a/yarn.lock b/yarn.lock index 9857dca..6175916 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6893,7 +6893,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.0.1, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -7492,16 +7492,6 @@ __metadata: languageName: node linkType: hard -"electron-debug@npm:^3.2.0": - version: 3.2.0 - resolution: "electron-debug@npm:3.2.0" - dependencies: - electron-is-dev: "npm:^1.1.0" - electron-localshortcut: "npm:^3.1.0" - checksum: 10c0/ee3e19c328f4a569b36c336b56a77833472b2e9942d08b1f2e567c3b81614e51bcdc0cd32ea1bdba0f75d2ee2e85024874a1ec6d3f123a7629de7817f79e8c95 - languageName: node - linkType: hard - "electron-devtools-installer@npm:^3.2.0": version: 3.2.0 resolution: "electron-devtools-installer@npm:3.2.0" @@ -7514,20 +7504,6 @@ __metadata: languageName: node linkType: hard -"electron-is-accelerator@npm:^0.1.0": - version: 0.1.2 - resolution: "electron-is-accelerator@npm:0.1.2" - checksum: 10c0/120da55c3b581cbca5eccdd80c9099574a7aa0a8ea8b9fd4e5dcd906dcf83308c94587ad771b066cdd073e45e68dbe4c06256602998f16ccafbcfe1cab968718 - languageName: node - linkType: hard - -"electron-is-dev@npm:^1.1.0": - version: 1.2.0 - resolution: "electron-is-dev@npm:1.2.0" - checksum: 10c0/56a4c8e9b9eb7d43da86ee63093b80b32e3fb92cc5e4a60a6b7cacafcdf456ec2c6102d90fa5919fb8b03c61848d4bfa2db820349c5abd9f19e73f7afd2dc22d - languageName: node - linkType: hard - "electron-is-dev@npm:^3.0.1": version: 3.0.1 resolution: "electron-is-dev@npm:3.0.1" @@ -7535,18 +7511,6 @@ __metadata: languageName: node linkType: hard -"electron-localshortcut@npm:^3.1.0": - version: 3.2.1 - resolution: "electron-localshortcut@npm:3.2.1" - dependencies: - debug: "npm:^4.0.1" - electron-is-accelerator: "npm:^0.1.0" - keyboardevent-from-electron-accelerator: "npm:^2.0.0" - keyboardevents-areequal: "npm:^0.2.1" - checksum: 10c0/6490a1dd0155926d5664500d45a5acb4771ba96e3ad4a878367e24ab96096c8824197cf3e2890a4f51b0307665afe680fe5f22dae2e4ba781cf32ddab9dcc335 - languageName: node - linkType: hard - "electron-log@npm:^5.1.4": version: 5.1.4 resolution: "electron-log@npm:5.1.4" @@ -10408,20 +10372,6 @@ __metadata: languageName: node linkType: hard -"keyboardevent-from-electron-accelerator@npm:^2.0.0": - version: 2.0.0 - resolution: "keyboardevent-from-electron-accelerator@npm:2.0.0" - checksum: 10c0/94bd9da6eb80145b36f336adb3f0a55cc8fdf0138f0df3028feb30d790d0727f8de27f040278805a499cc61dba816c8fab012e7f76c2495033d2fd7c2762f309 - languageName: node - linkType: hard - -"keyboardevents-areequal@npm:^0.2.1": - version: 0.2.2 - resolution: "keyboardevents-areequal@npm:0.2.2" - checksum: 10c0/1612c2aa52001163b2517ef6c0ea9abf20117e206e6796ba15eb99c0ae331a8826ab60a18e7ddb8ed0e15272af64d3b14383d2ae832beaa2f68548c1c53e4fa6 - languageName: node - linkType: hard - "keyv@npm:^4.0.0": version: 4.5.2 resolution: "keyv@npm:4.5.2" @@ -11749,7 +11699,6 @@ __metadata: concurrently: "npm:^8.2.2" electron: "npm:^30.0.5" electron-builder: "npm:^24.13.3" - electron-debug: "npm:^3.2.0" electron-devtools-installer: "npm:^3.2.0" electron-is-dev: "npm:^3.0.1" electron-log: "npm:^5.1.4"