diff --git a/README.md b/README.md
index a79f5c288..b80843578 100644
--- a/README.md
+++ b/README.md
@@ -91,6 +91,7 @@ Mocking up web app with Vitesse(speed)
- [VueUse](https://github.com/antfu/vueuse) - collection of useful composition APIs
- [`vite-ssg-sitemap`](https://github.com/jbaubree/vite-ssg-sitemap) - Sitemap generator
- [`@vueuse/head`](https://github.com/vueuse/head) - manipulate document head reactively
+- [`vite-plugin-vue-inspector`](https://github.com/webfansplz/vite-plugin-vue-inspector) - jump to local IDE source code while click the element of browser automatically
### Coding Style
diff --git a/README.zh-CN.md b/README.zh-CN.md
index da7cbe7e3..2185cde09 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -89,6 +89,7 @@
- [VueUse](https://github.com/antfu/vueuse) - 实用的 Composition API 工具合集
- [`vite-ssg-sitemap`](https://github.com/jbaubree/vite-ssg-sitemap) - 站点地图生成器
- [`@vueuse/head`](https://github.com/vueuse/head) - 响应式地操作文档头信息
+- [`vite-plugin-vue-inspector`](https://github.com/webfansplz/vite-plugin-vue-inspector) - 点击页面元素自动跳转到本地IDE对应的 Vue 组件
### 编码风格
diff --git a/package.json b/package.json
index 9ec767663..674f858c2 100644
--- a/package.json
+++ b/package.json
@@ -49,6 +49,7 @@
"vite-plugin-md": "^0.13.1",
"vite-plugin-pages": "^0.23.0",
"vite-plugin-pwa": "^0.12.0",
+ "vite-plugin-vue-inspector": "^1.0.0",
"vite-plugin-vue-layouts": "^0.6.0",
"vite-ssg": "^0.20.0",
"vite-ssg-sitemap": "^0.2.6",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e7a7da423..9abea371a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -31,6 +31,7 @@ specifiers:
vite-plugin-md: ^0.13.1
vite-plugin-pages: ^0.23.0
vite-plugin-pwa: ^0.12.0
+ vite-plugin-vue-inspector: ^1.0.0
vite-plugin-vue-layouts: ^0.6.0
vite-ssg: ^0.20.0
vite-ssg-sitemap: ^0.2.6
@@ -78,6 +79,7 @@ devDependencies:
vite-plugin-md: 0.13.1_vite@2.9.8
vite-plugin-pages: 0.23.0_vite@2.9.8
vite-plugin-pwa: 0.12.0_vite@2.9.8
+ vite-plugin-vue-inspector: 1.0.0_vite@2.9.8
vite-plugin-vue-layouts: 0.6.0_husqietd6xoepun2tc4v73afle
vite-ssg: 0.20.0_uhne5wm5qpolinapsgjqcugibi
vite-ssg-sitemap: 0.2.6
@@ -296,6 +298,24 @@ packages:
- supports-color
dev: true
+ /@babel/helper-create-class-features-plugin/7.18.0_@babel+core@7.17.9:
+ resolution: {integrity: sha512-Kh8zTGR9de3J63e5nS0rQUdRs/kbtwoeQQ0sriS0lItjC96u8XXZN6lKpuyWd2coKSU13py/y+LTmThLuVX0Pg==}
+ engines: {node: '>=6.9.0'}
+ peerDependencies:
+ '@babel/core': ^7.0.0
+ dependencies:
+ '@babel/core': 7.17.9
+ '@babel/helper-annotate-as-pure': 7.16.7
+ '@babel/helper-environment-visitor': 7.16.7
+ '@babel/helper-function-name': 7.17.9
+ '@babel/helper-member-expression-to-functions': 7.17.7
+ '@babel/helper-optimise-call-expression': 7.16.7
+ '@babel/helper-replace-supers': 7.16.7
+ '@babel/helper-split-export-declaration': 7.16.7
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@babel/helper-create-regexp-features-plugin/7.17.0_@babel+core@7.17.9:
resolution: {integrity: sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA==}
engines: {node: '>=6.9.0'}
@@ -396,6 +416,11 @@ packages:
engines: {node: '>=6.9.0'}
dev: true
+ /@babel/helper-plugin-utils/7.17.12:
+ resolution: {integrity: sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA==}
+ engines: {node: '>=6.9.0'}
+ dev: true
+
/@babel/helper-remap-async-to-generator/7.16.8:
resolution: {integrity: sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==}
engines: {node: '>=6.9.0'}
@@ -739,6 +764,15 @@ packages:
'@babel/helper-plugin-utils': 7.16.7
dev: true
+ /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.17.9:
+ resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==}
+ peerDependencies:
+ '@babel/core': ^7.0.0-0
+ dependencies:
+ '@babel/core': 7.17.9
+ '@babel/helper-plugin-utils': 7.16.7
+ dev: true
+
/@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.17.9:
resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==}
peerDependencies:
@@ -748,6 +782,16 @@ packages:
'@babel/helper-plugin-utils': 7.16.7
dev: true
+ /@babel/plugin-syntax-jsx/7.17.12_@babel+core@7.17.9:
+ resolution: {integrity: sha512-spyY3E3AURfxh/RHtjx5j6hs8am5NbUBGfcZ2vB3uShSpZdQyXSf5rR5Mk76vbtlAZOelyVQ71Fg0x9SG4fsog==}
+ engines: {node: '>=6.9.0'}
+ peerDependencies:
+ '@babel/core': ^7.0.0-0
+ dependencies:
+ '@babel/core': 7.17.9
+ '@babel/helper-plugin-utils': 7.17.12
+ dev: true
+
/@babel/plugin-syntax-logical-assignment-operators/7.10.4_@babel+core@7.17.9:
resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==}
peerDependencies:
@@ -822,6 +866,16 @@ packages:
'@babel/helper-plugin-utils': 7.16.7
dev: true
+ /@babel/plugin-syntax-typescript/7.17.12_@babel+core@7.17.9:
+ resolution: {integrity: sha512-TYY0SXFiO31YXtNg3HtFwNJHjLsAyIIhAhNWkQ5whPPS7HWUFlg9z0Ta4qAQNjQbP1wsSt/oKkmZ/4/WWdMUpw==}
+ engines: {node: '>=6.9.0'}
+ peerDependencies:
+ '@babel/core': ^7.0.0-0
+ dependencies:
+ '@babel/core': 7.17.9
+ '@babel/helper-plugin-utils': 7.17.12
+ dev: true
+
/@babel/plugin-transform-arrow-functions/7.16.7_@babel+core@7.17.9:
resolution: {integrity: sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==}
engines: {node: '>=6.9.0'}
@@ -1161,6 +1215,20 @@ packages:
'@babel/helper-plugin-utils': 7.16.7
dev: true
+ /@babel/plugin-transform-typescript/7.18.1_@babel+core@7.17.9:
+ resolution: {integrity: sha512-F+RJmL479HJmC0KeqqwEGZMg1P7kWArLGbAKfEi9yPthJyMNjF+DjxFF/halfQvq1Q9GFM4TUbYDNV8xe4Ctqg==}
+ engines: {node: '>=6.9.0'}
+ peerDependencies:
+ '@babel/core': ^7.0.0-0
+ dependencies:
+ '@babel/core': 7.17.9
+ '@babel/helper-create-class-features-plugin': 7.18.0_@babel+core@7.17.9
+ '@babel/helper-plugin-utils': 7.17.12
+ '@babel/plugin-syntax-typescript': 7.17.12_@babel+core@7.17.9
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@babel/plugin-transform-unicode-escapes/7.16.7_@babel+core@7.17.9:
resolution: {integrity: sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==}
engines: {node: '>=6.9.0'}
@@ -2045,6 +2113,27 @@ packages:
'@vue/reactivity': 3.2.33
dev: true
+ /@vue/babel-helper-vue-transform-on/1.0.2:
+ resolution: {integrity: sha512-hz4R8tS5jMn8lDq6iD+yWL6XNB699pGIVLk7WSJnn1dbpjaazsjZQkieJoRX6gW5zpYSCFqQ7jUquPNY65tQYA==}
+ dev: true
+
+ /@vue/babel-plugin-jsx/1.1.1_@babel+core@7.17.9:
+ resolution: {integrity: sha512-j2uVfZjnB5+zkcbc/zsOc0fSNGCMMjaEXP52wdwdIfn0qjFfEYpYZBFKFg+HHnQeJCVrjOeO0YxgaL7DMrym9w==}
+ dependencies:
+ '@babel/helper-module-imports': 7.16.7
+ '@babel/plugin-syntax-jsx': 7.17.12_@babel+core@7.17.9
+ '@babel/template': 7.16.7
+ '@babel/traverse': 7.17.9
+ '@babel/types': 7.17.0
+ '@vue/babel-helper-vue-transform-on': 1.0.2
+ camelcase: 6.3.0
+ html-tags: 3.2.0
+ svg-tags: 1.0.0
+ transitivePeerDependencies:
+ - '@babel/core'
+ - supports-color
+ dev: true
+
/@vue/compiler-core/3.2.33:
resolution: {integrity: sha512-AAmr52ji3Zhk7IKIuigX2osWWsb2nQE5xsdFYjdnmtQ4gymmqXbjLvkSE174+fF3A3kstYrTgGkqgOEbsdLDpw==}
dependencies:
@@ -2606,6 +2695,11 @@ packages:
upper-case: 1.1.3
dev: true
+ /camelcase/6.3.0:
+ resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==}
+ engines: {node: '>=10'}
+ dev: true
+
/caniuse-lite/1.0.30001332:
resolution: {integrity: sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw==}
dev: true
@@ -3434,6 +3528,12 @@ packages:
dev: true
optional: true
+ /esbuild-node-loader/0.6.5:
+ resolution: {integrity: sha512-uPP+dllWm38cFvDysdocutN3lfe5pTIbddAHp1ENyLzpHYqE2r+3Wo+pfg9X3p8DFWwzIisft5YkeBIthIcixw==}
+ dependencies:
+ esbuild: 0.14.39
+ dev: true
+
/esbuild-openbsd-64/0.14.39:
resolution: {integrity: sha512-secQU+EpgUPpYjJe3OecoeGKVvRMLeKUxSMGHnK+aK5uQM3n1FPXNJzyz1LHFOo0WOyw+uoCxBYdM4O10oaCAA==}
engines: {node: '>=12'}
@@ -3443,6 +3543,14 @@ packages:
dev: true
optional: true
+ /esbuild-register/3.3.2_esbuild@0.14.39:
+ resolution: {integrity: sha512-jceAtTO6zxPmCfSD5cBb3rgIK1vmuqCKYwgylHiS1BF4pq0jJiJb4K2QMuqF4BEw7XDBRatYzip0upyTzfkgsQ==}
+ peerDependencies:
+ esbuild: '>=0.12 <1'
+ dependencies:
+ esbuild: 0.14.39
+ dev: true
+
/esbuild-sunos-64/0.14.39:
resolution: {integrity: sha512-qHq0t5gePEDm2nqZLb+35p/qkaXVS7oIe32R0ECh2HOdiXXkj/1uQI9IRogGqKkK+QjDG+DhwiUw7QoHur/Rwg==}
engines: {node: '>=12'}
@@ -3843,6 +3951,17 @@ packages:
- supports-color
dev: true
+ /esno/0.14.1:
+ resolution: {integrity: sha512-yDFYw6dGUjCT1qKsdG7WOc/RzIh/qwxUEVZ+ohCltaxBxEFMNqeqbQL9xjRl6Yvdwrfc5OCjUA9JbFmuu/8BKg==}
+ hasBin: true
+ dependencies:
+ cross-spawn: 7.0.3
+ esbuild: 0.14.39
+ esbuild-node-loader: 0.6.5
+ esbuild-register: 3.3.2_esbuild@0.14.39
+ import-meta-resolve: 1.1.1
+ dev: true
+
/espree/6.2.1:
resolution: {integrity: sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==}
engines: {node: '>=6.0.0'}
@@ -4440,6 +4559,11 @@ packages:
uglify-js: 3.15.4
dev: true
+ /html-tags/3.2.0:
+ resolution: {integrity: sha512-vy7ClnArOZwCnqZgvv+ddgHgJiAFXe3Ge9ML5/mBctVJoUoYPCdxVucOywjDARn6CVoh3dRSFdPHy2sX80L0Wg==}
+ engines: {node: '>=8'}
+ dev: true
+
/html5parser/2.0.2:
resolution: {integrity: sha512-L0y+IdTVxHsovmye8MBtFgBvWZnq1C9WnI/SmJszxoQjmUH1psX2uzDk21O5k5et6udxdGjwxkbmT9eVRoG05w==}
dependencies:
@@ -4559,6 +4683,12 @@ packages:
resolve-from: 4.0.0
dev: true
+ /import-meta-resolve/1.1.1:
+ resolution: {integrity: sha512-JiTuIvVyPaUg11eTrNDx5bgQ/yMKMZffc7YSjvQeSMXy58DO2SQ8BtAf3xteZvmzvjYh14wnqNjL8XVeDy2o9A==}
+ dependencies:
+ builtins: 4.1.0
+ dev: true
+
/imurmurhash/0.1.4:
resolution: {integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o=}
engines: {node: '>=0.8.19'}
@@ -6249,6 +6379,10 @@ packages:
engines: {node: '>=8'}
dev: true
+ /shell-quote/1.7.3:
+ resolution: {integrity: sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==}
+ dev: true
+
/side-channel/1.0.4:
resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==}
dependencies:
@@ -6523,6 +6657,10 @@ packages:
engines: {node: '>= 0.4'}
dev: true
+ /svg-tags/1.0.0:
+ resolution: {integrity: sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=}
+ dev: true
+
/symbol-tree/3.2.4:
resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}
dev: true
@@ -7068,6 +7206,26 @@ packages:
- supports-color
dev: true
+ /vite-plugin-vue-inspector/1.0.0_vite@2.9.8:
+ resolution: {integrity: sha512-kCnlGuxfalG1cX/uXyMoElAPQGtw0+qKJy+fSW20hDxPb6Hhrge19ywBLciQMfY3yZde8ukpp0UmS78z3DzsVA==}
+ peerDependencies:
+ vite: ^2.0.0
+ dependencies:
+ '@babel/core': 7.17.9
+ '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.17.9
+ '@babel/plugin-transform-typescript': 7.18.1_@babel+core@7.17.9
+ '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.17.9
+ '@vue/compiler-dom': 3.2.33
+ chalk: 4.1.2
+ esno: 0.14.1
+ kolorist: 1.5.1
+ magic-string: 0.26.1
+ shell-quote: 1.7.3
+ vite: 2.9.8
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/vite-plugin-vue-layouts/0.6.0_husqietd6xoepun2tc4v73afle:
resolution: {integrity: sha512-7QX7o/NpCfs+hyXphwYfmPqAEQ6qd4uXsvI0VsovjGT2eCoEE5dMdP6L+uqqNWY4uqv7oCvtinecZmbzZv/9Rg==}
peerDependencies:
diff --git a/vite.config.ts b/vite.config.ts
index 9028c70c1..ed10e49e3 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -10,6 +10,7 @@ import Markdown from 'vite-plugin-md'
import { VitePWA } from 'vite-plugin-pwa'
import VueI18n from '@intlify/vite-plugin-vue-i18n'
import Inspect from 'vite-plugin-inspect'
+import Inspector from 'vite-plugin-vue-inspector'
import Prism from 'markdown-it-prism'
import LinkAttributes from 'markdown-it-link-attributes'
import Unocss from 'unocss/vite'
@@ -120,6 +121,11 @@ export default defineConfig({
// https://github.com/antfu/vite-plugin-inspect
// Visit http://localhost:3333/__inspect/ to see the inspector
Inspect(),
+
+ // https://github.com/webfansplz/vite-plugin-vue-inspector
+ Inspector({
+ toggleButtonVisibility: 'never',
+ }),
],
// https://github.com/antfu/vite-ssg