Open dev tools only if app is not packaged

This commit is contained in:
everoddandeven 2024-10-16 00:47:23 +02:00
parent 4fb5627ac1
commit 3edd9d52bc

View file

@ -57,7 +57,7 @@ function createWindow(): BrowserWindow {
tray.setContextMenu(trayMenu);
console.log(`createWindow(): icon = ${wdwIcon}`);
console.log(`app.isPackaged: ${app.isPackaged}`);
// Create the browser window.
win = new BrowserWindow({
x: 0,
@ -69,13 +69,13 @@ function createWindow(): BrowserWindow {
nodeIntegration: false,
allowRunningInsecureContent: (serve),
contextIsolation: true,
devTools: true
devTools: !app.isPackaged
},
autoHideMenuBar: true,
icon: wdwIcon
});
win.webContents.openDevTools();
if (!app.isPackaged)win.webContents.openDevTools();
if (serve) {
const debug = require('electron-debug');