Skip to content

Commit ef5b355

Browse files
committed
chore: update
1 parent e8a1a80 commit ef5b355

File tree

6 files changed

+12
-18
lines changed

6 files changed

+12
-18
lines changed

docs/guide/vite-plugin.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@ interface VitePluginVueDevToolsOptions {
5959
/**
6060
* Customize openInEditor host (e.g. http://localhost:3000)
6161
* @default false
62+
* @deprecated This option is deprecated and removed in 7.1.0. The plugin now automatically detects the correct host.
6263
*/
6364
openInEditorHost?: string | false
6465

6566
/**
6667
* DevTools client host (e.g. http://localhost:3000)
6768
* useful for projects that use a reverse proxy
6869
* @default false
70+
* @deprecated This option is deprecated and removed in 7.1.0. The plugin now automatically detects the correct host.
6971
*/
7072
clientHost?: string | false
7173
}
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import { openInEditor as _openInEditor, callViteServerAction } from '@vue/devtools-core'
1+
import { openInEditor as _openInEditor } from '@vue/devtools-core'
22

3-
const getOpenInEditorHost = callViteServerAction<string>('get-open-in-editor-host')
43
export const vueInspectorDetected = ref(false)
54

65
export const openInEditor = async (file: string) => {
7-
const openInEditorHost = await getOpenInEditorHost()
8-
return openInEditorHost ? _openInEditor(file, openInEditorHost) : _openInEditor(file)
6+
return _openInEditor(file)
97
}

packages/vite/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"execa": "^8.0.1",
5757
"sirv": "^2.0.4",
5858
"vite-plugin-inspect": "^0.8.3",
59-
"vite-plugin-vue-inspector": "^4.0.2"
59+
"vite-plugin-vue-inspector": "^5.0.0"
6060
},
6161
"devDependencies": {
6262
"@types/node": "^20.12.5",

packages/vite/src/modules/get-config.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,4 @@ export function getViteConfig(config: ResolvedConfig, pluginOptions) {
55
defineViteServerAction('get-vite-root', () => {
66
return config.root
77
})
8-
defineViteServerAction('get-open-in-editor-host', () => {
9-
return pluginOptions.openInEditorHost
10-
})
118
}

packages/vite/src/vite.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,12 @@ export interface VitePluginVueDevToolsOptions {
6464
componentInspector?: boolean | VitePluginInspectorOptions
6565
}
6666

67-
const defaultOptions: DeepRequired<VitePluginVueDevToolsOptions> = {
67+
const defaultOptions: VitePluginVueDevToolsOptions = {
6868
appendTo: '',
69-
openInEditorHost: false,
70-
clientHost: false,
7169
componentInspector: true,
7270
}
7371

74-
function mergeOptions(options: VitePluginVueDevToolsOptions): DeepRequired<VitePluginVueDevToolsOptions> {
72+
function mergeOptions(options: VitePluginVueDevToolsOptions): VitePluginVueDevToolsOptions {
7573
return Object.assign({}, defaultOptions, options)
7674
}
7775

@@ -139,7 +137,7 @@ export default function VitePluginVueDevTools(options?: VitePluginVueDevToolsOpt
139137
},
140138
async load(id) {
141139
if (id === 'virtual:vue-devtools-options')
142-
return `export default ${JSON.stringify({ base: config.base, clientHost: pluginOptions.clientHost, componentInspector: pluginOptions.componentInspector })}`
140+
return `export default ${JSON.stringify({ base: config.base, componentInspector: pluginOptions.componentInspector })}`
143141
},
144142
transform(code, id) {
145143
const { root } = config
@@ -200,7 +198,6 @@ export default function VitePluginVueDevTools(options?: VitePluginVueDevToolsOpt
200198
...typeof pluginOptions.componentInspector === 'boolean'
201199
? {}
202200
: pluginOptions.componentInspector,
203-
openInEditorHost: pluginOptions.openInEditorHost,
204201
appendTo: pluginOptions.appendTo || 'manually',
205202
}) as PluginOption,
206203
plugin,

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)