From 0d1fe635d35631165a78dd5dec008c8f92f36b7c Mon Sep 17 00:00:00 2001 From: SaberA1ter <73547598+SaberA1ter@users.noreply.github.com> Date: Wed, 27 Jul 2022 00:36:17 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=AF=B9=E4=BA=8E=E6=89=93=E5=BC=80?= =?UTF-8?q?=20devTools=20=E4=BB=A5=E8=A7=A3=E9=99=A4=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E6=9B=BF=E4=BB=A3=E6=96=B0=E5=A2=9E=E4=B8=80=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/main/index.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/electron/main/index.ts b/electron/main/index.ts index eb35dab..230129a 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -52,12 +52,10 @@ async function createWindow() { win.loadFile(indexHtml) } else { win.loadURL(url) - // win.webContents.openDevTools() + // Open devTool if the app is not packaged + win.webContents.openDevTools() } - // Open devTool if the app is not packaged - !isPackaged && win.webContents.openDevTools() - // Test actively push message to the Electron-Renderer win.webContents.on('did-finish-load', () => { win?.webContents.send('main-process-message', new Date().toLocaleString())