Skip to content

Commit 93cf452

Browse files
fix(overmind-devtools): fix issue with changing port
1 parent f4ca659 commit 93cf452

File tree

2 files changed

+5
-3
lines changed
  • packages/node_modules

2 files changed

+5
-3
lines changed

packages/node_modules/overmind-devtools-client/src/overmind/effects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const utils = {
77
return window.confirm(text)
88
},
99
getPort() {
10-
return Number(window['__OVERMIND_DEVTOOLS_BACKEND_PORT__'] || 3031)
10+
return Number(window['__OVERMIND_DEVTOOLS_BACKEND_PORT__'] || location.search.split('=')[1] || 3031)
1111
},
1212
}
1313

packages/node_modules/overmind-devtools/src/main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = 'true'
1010

1111
function createWindow() {
1212
const mainWindow = new BrowserWindow({
13+
webPreferences: {
14+
nodeIntegration: true
15+
},
1316
icon: path.resolve('icons', 'icon.png'),
1417
height: 768,
1518
width: 768,
@@ -80,8 +83,7 @@ function createWindow() {
8083
}
8184
)
8285
} else {
83-
console.log("y0!")
84-
mainWindow.loadURL('http://localhost:8080')
86+
mainWindow.loadURL(`http://localhost:8080?port=${port}`)
8587
mainWindow.webContents.openDevTools()
8688
}
8789
}

0 commit comments

Comments
 (0)