1
1
2
2
<p align =" center " >
3
- <a href =" https://github.com/webfansplz/vite-plugin-vue-inspector " ><img src =" https://github.com/webfansplz/vite-plugin-vue-inspector/blob/main/docs/images/ logo.png " alt =" vite-plugin-vue-inspector " ></a >
3
+ <a href =" https://github.com/webfansplz/vite-plugin-vue-inspector " ><img src =" ./ logo.svg " width = " 180 " alt =" vite-plugin-vue-inspector " ></a >
4
4
</p >
5
5
6
6
<p align =" center " >
10
10
</p >
11
11
12
12
<p align =" center " >
13
- <a href =" https://stackblitz.com/edit/vitejs-vite-te3qgo ?file=vite.config.ts&terminal=dev " ><img src =" https://developer.stackblitz.com/img/open_in_stackblitz.svg " alt =" " ></a >
13
+ <a href =" https://stackblitz.com/edit/vitejs-vite-rbr2as ?file=src%2FApp.vue " ><img src =" https://developer.stackblitz.com/img/open_in_stackblitz.svg " alt =" " ></a >
14
14
</p >
15
15
16
16
## 📖 Introduction
17
17
18
18
A vite plugin which provides the ability that to jump to the local IDE when you click the element of browser automatically. It supports Vue2 & 3 & SSR.
19
19
20
20
<p align =" center " >
21
- <img src =" https://github.com/webfansplz/vite-plugin-vue-inspector/blob/main/docs/images/vite-plugin-vue-inspector .gif" alt =" vite-plugin-vue-inspector " >
21
+ <img src =" ./public/preview .gif" alt =" vite-plugin-vue-inspector " >
22
22
</p >
23
23
24
24
## 📦 Installation
@@ -41,9 +41,9 @@ npm install vite-plugin-vue-inspector -D
41
41
``` ts
42
42
// for Vue2
43
43
44
- import { defineConfig } from " vite"
45
- import { createVuePlugin } from " vite-plugin-vue2"
46
- import Inspector from " vite-plugin-vue-inspector"
44
+ import { defineConfig } from ' vite'
45
+ import { createVuePlugin } from ' vite-plugin-vue2'
46
+ import Inspector from ' vite-plugin-vue-inspector'
47
47
48
48
export default defineConfig ({
49
49
plugins: [
@@ -58,9 +58,9 @@ export default defineConfig({
58
58
``` ts
59
59
// for Vue3
60
60
61
- import { defineConfig } from " vite"
62
- import Vue from " @vitejs/plugin-vue"
63
- import Inspector from " vite-plugin-vue-inspector"
61
+ import { defineConfig } from ' vite'
62
+ import Vue from ' @vitejs/plugin-vue'
63
+ import Inspector from ' vite-plugin-vue-inspector'
64
64
65
65
export default defineConfig ({
66
66
plugins: [Vue (), Inspector ()],
@@ -72,18 +72,17 @@ export default defineConfig({
72
72
// nuxt.config.ts
73
73
74
74
import { defineNuxtConfig } from ' nuxt'
75
- import Inspector from " vite-plugin-vue-inspector"
75
+ import Inspector from ' vite-plugin-vue-inspector'
76
76
77
77
export default defineNuxtConfig ({
78
78
vite: {
79
- plugins:[
79
+ plugins: [
80
80
Inspector ({
81
- appendTo: " entry.mjs"
81
+ appendTo: ' entry.mjs'
82
82
})
83
83
]
84
84
}
85
85
})
86
-
87
86
```
88
87
89
88
### Options
@@ -118,13 +117,13 @@ interface VitePluginInspectorOptions {
118
117
* Toggle button visibility
119
118
* @default ' active'
120
119
*/
121
- toggleButtonVisibility? : " always" | " active" | " never"
120
+ toggleButtonVisibility? : ' always' | ' active' | ' never'
122
121
123
122
/**
124
123
* Toggle button display position
125
124
* @default top-right
126
125
*/
127
- toggleButtonPos? : " top-right" | " top-left" | " bottom-right" | " bottom-left"
126
+ toggleButtonPos? : ' top-right' | ' top-left' | ' bottom-right' | ' bottom-left'
128
127
129
128
/**
130
129
* append an import to the module id ending with `appendTo` instead of adding a script into body
@@ -138,9 +137,9 @@ interface VitePluginInspectorOptions {
138
137
139
138
### Example
140
139
141
- - [ Vue2] ( https://github.com/webfansplz/vite-plugin-vue-inspector/tree/main/example /vue2 )
142
- - [ Vue3] ( https://github.com/webfansplz/vite-plugin-vue-inspector/tree/main/example /vue3 )
143
- - [ Nuxt3] ( https://github.com/webfansplz/vite-plugin-vue-inspector/tree/main/example /nuxt )
140
+ - [ Vue2] ( https://github.com/webfansplz/vite-plugin-vue-inspector/tree/main/packages/playground /vue2 )
141
+ - [ Vue3] ( https://github.com/webfansplz/vite-plugin-vue-inspector/tree/main/packages/playground /vue3 )
142
+ - [ Nuxt3] ( https://github.com/webfansplz/vite-plugin-vue-inspector/tree/main/packages/playground /nuxt )
144
143
145
144
## 🔌 Configuration IDE / Editor
146
145
@@ -152,7 +151,7 @@ For example, if you want it always open VSCode when inspection clicked, set `exp
152
151
### VSCode
153
152
154
153
- install VSCode command line tools, [ see the official docs] ( https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line )
155
- ![ install-vscode-cli] ( https://github.com/webfansplz/vite-plugin-vue-inspector/blob/main/docs/images /install-vscode-cli.png)
154
+ ![ install-vscode-cli] ( ./public /install-vscode-cli.png)
156
155
157
156
- set env to shell, like ` .bashrc ` or ` .zshrc `
158
157
0 commit comments