Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit 14a0b0d

Browse files
authored
feat: introducing openInEditorHost option (#169)
1 parent dce3427 commit 14a0b0d

File tree

5 files changed

+26
-5
lines changed

5 files changed

+26
-5
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ interface VitePluginVueDevToolsOptions {
140140
* }
141141
*/
142142
analyze?: Partial<AnalyzeOptions>
143+
144+
/**
145+
* Customize openInEditor host (e.g. http://localhost:3000)
146+
* @default false
147+
*/
148+
openInEditorHost?: string | false
143149
}
144150
```
145151

packages/node/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ interface VitePluginVueDevToolsOptions {
140140
* }
141141
*/
142142
analyze?: Partial<AnalyzeOptions>
143+
144+
/**
145+
* Customize openInEditor host (e.g. http://localhost:3000)
146+
* @default false
147+
*/
148+
openInEditorHost?: string | false
143149
}
144150
```
145151

packages/node/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"execa": "^7.1.1",
5858
"sirv": "^2.0.3",
5959
"vite-plugin-inspect": "^0.7.33",
60-
"vite-plugin-vue-inspector": "^3.4.2"
60+
"vite-plugin-vue-inspector": "^3.5.0"
6161
},
6262
"devDependencies": {
6363
"@types/node": "^20.4.4",

packages/node/src/vite.ts

+9
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,18 @@ export interface VitePluginVueDevToolsOptions {
4242
* }
4343
*/
4444
analyze?: Partial<AnalyzeOptions>
45+
46+
/**
47+
* Customize openInEditor host (e.g. http://localhost:3000)
48+
* @default false
49+
*/
50+
openInEditorHost?: string | false
4551
}
4652

4753
const defaultOptions: DeepRequired<VitePluginVueDevToolsOptions> = {
4854
appendTo: '',
4955
analyze: analyzeOptionsDefault,
56+
openInEditorHost: false,
5057
}
5158

5259
function mergeOptions(options: VitePluginVueDevToolsOptions): DeepRequired<VitePluginVueDevToolsOptions> {
@@ -176,6 +183,8 @@ export default function VitePluginVueDevTools(options?: VitePluginVueDevToolsOpt
176183
VueInspector({
177184
toggleComboKey: '',
178185
toggleButtonVisibility: 'never',
186+
openInEditorHost: pluginOptions.openInEditorHost,
187+
...(pluginOptions.appendTo ? { appendTo: pluginOptions.appendTo } : {}),
179188
}),
180189
]
181190
}

pnpm-lock.yaml

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)