fix: prevent opening devtools in production build
This commit is contained in:
+1
-3
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user