fix: `F12` cannot open devTools in development mode (#833)
This commit is contained in:
parent
6c4c543708
commit
ba20507cbc
|
|
@ -48,6 +48,13 @@ function bootstrap() {
|
|||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.whenReady().then(() => {
|
||||
// Default open or close DevTools by F12 in development
|
||||
// and ignore CommandOrControl + R in production.
|
||||
// see https://github.com/alex8088/electron-toolkit/tree/master/packages/utils
|
||||
app.on("browser-window-created", (_, window) => {
|
||||
optimizer.watchWindowShortcuts(window)
|
||||
})
|
||||
|
||||
// Set app user model id for windows
|
||||
electronApp.setAppUserModelId(`re.${APP_PROTOCOL}`)
|
||||
|
||||
|
|
@ -87,13 +94,6 @@ function bootstrap() {
|
|||
url && handleOpen(url)
|
||||
})
|
||||
|
||||
// Default open or close DevTools by F12 in development
|
||||
// and ignore CommandOrControl + R in production.
|
||||
// see https://github.com/alex8088/electron-toolkit/tree/master/packages/utils
|
||||
app.on("browser-window-created", (_, window) => {
|
||||
optimizer.watchWindowShortcuts(window)
|
||||
})
|
||||
|
||||
// for dev debug
|
||||
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
|
|
|
|||
Loading…
Reference in New Issue