fix: prevent opening devtools in production build

This commit is contained in:
talksik
2026-03-19 17:20:23 -07:00
parent e1295b434b
commit 2915a30fe0
+1 -3
View File
@@ -27,14 +27,12 @@ const createWindow = () => {
// and load the index.html of the app. // and load the index.html of the app.
if (MAIN_WINDOW_VITE_DEV_SERVER_URL) { if (MAIN_WINDOW_VITE_DEV_SERVER_URL) {
mainWindow.loadURL(MAIN_WINDOW_VITE_DEV_SERVER_URL); mainWindow.loadURL(MAIN_WINDOW_VITE_DEV_SERVER_URL);
mainWindow.webContents.openDevTools();
} else { } else {
mainWindow.loadFile( mainWindow.loadFile(
path.join(__dirname, `../renderer/${MAIN_WINDOW_VITE_NAME}/index.html`), path.join(__dirname, `../renderer/${MAIN_WINDOW_VITE_NAME}/index.html`),
); );
} }
// Open the DevTools.
mainWindow.webContents.openDevTools();
}; };
// Window control IPC handlers // Window control IPC handlers