Skip to content

Commit e8ddfe2

Browse files
feat(standalone): add default host/port for connect function (#254)
1 parent 6ed9dcd commit e8ddfe2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/guide/standalone.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ And connect to host:
105105

106106
```ts
107107
if (process.env.NODE_ENV === 'development')
108-
devtools.connect(/* host, port */)
108+
devtools.connect(/* host (the default is "http://localhost"), port (the default is 8090) */)
109109
```
110110

111111
:::tip Important

packages/electron/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { target } from '@vue/devtools-shared'
22
import { devtools } from '../../devtools-kit/src/index'
33

4-
export async function connect(host: string, port: number) {
4+
export async function connect(host = 'http://localhost', port = 8098) {
55
devtools.init()
66
target.__VUE_DEVTOOLS_HOST__ = host
77
target.__VUE_DEVTOOLS_PORT__ = port

packages/playground/termui/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ globalThis.document = {
88
getElementById: () => {},
99
} as any
1010

11-
devtools.connect('http://localhost', 8098)
11+
devtools.connect()
1212

1313
const app = createApp(App)
1414
app.mount()

0 commit comments

Comments
 (0)