From 631baa84dc1be8169d3213c1a3b59a7de500c160 Mon Sep 17 00:00:00 2001 From: buqiyuan <1743369777@qq.com> Date: Thu, 2 Jun 2022 21:12:04 +0800 Subject: [PATCH] fix: hide devTools with production --- src/app/electron-main/main.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/electron-main/main.ts b/src/app/electron-main/main.ts index 0750e6be9..4fb8a404f 100644 --- a/src/app/electron-main/main.ts +++ b/src/app/electron-main/main.ts @@ -52,11 +52,11 @@ function createWindow(): BrowserWindow { ? 'http://localhost:4200' : `file://${path.join(__dirname, '../../../src/workbench/browser/dist/index.html')}`; win.loadURL(file); - // if (['development'].includes(processEnv)) { - win.webContents.openDevTools({ - mode: 'undocked', - }); - // } + if (['development'].includes(processEnv)) { + win.webContents.openDevTools({ + mode: 'undocked', + }); + } UnitWorkerModule.setup({ view: win, });