diff --git a/README.md b/README.md index a79f5c2..b808435 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 da7cbe7..2185cde 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 a72d545..cb611dd 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "vite-plugin-md": "^0.13.0", "vite-plugin-pages": "^0.23.0", "vite-plugin-pwa": "^0.12.0", + "vite-plugin-vue-inspector": "0.5.6", "vite-plugin-vue-layouts": "^0.6.0", "vite-ssg": "^0.19.2", "vite-ssg-sitemap": "^0.2.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d5ce50b..5b6e55a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,6 +31,7 @@ specifiers: vite-plugin-md: ^0.13.0 vite-plugin-pages: ^0.23.0 vite-plugin-pwa: ^0.12.0 + vite-plugin-vue-inspector: 0.5.6 vite-plugin-vue-layouts: ^0.6.0 vite-ssg: ^0.19.2 vite-ssg-sitemap: ^0.2.6 @@ -78,6 +79,7 @@ devDependencies: vite-plugin-md: 0.13.0_vite@2.9.7 vite-plugin-pages: 0.23.0_vite@2.9.7 vite-plugin-pwa: 0.12.0_vite@2.9.7 + vite-plugin-vue-inspector: 0.5.6_vite@2.9.7 vite-plugin-vue-layouts: 0.6.0_cy27blvoe2cwdzwso5wue736a4 vite-ssg: 0.19.2_csn2dxpwjxhcufqcjewtaqepne vite-ssg-sitemap: 0.2.6 @@ -739,6 +741,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 +759,16 @@ packages: '@babel/helper-plugin-utils': 7.16.7 dev: true + /@babel/plugin-syntax-jsx/7.16.7_@babel+core@7.17.9: + resolution: {integrity: sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==} + engines: {node: '>=6.9.0'} + 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-logical-assignment-operators/7.10.4_@babel+core@7.17.9: resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: @@ -822,6 +843,16 @@ packages: '@babel/helper-plugin-utils': 7.16.7 dev: true + /@babel/plugin-syntax-typescript/7.17.10_@babel+core@7.17.9: + resolution: {integrity: sha512-xJefea1DWXW09pW4Tm9bjwVlPDyYA2it3fWlmEjpYz6alPvTUjL0EOzNzI/FEOyI3r4/J7uVH5UqKgl1TQ5hqQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.17.9 + '@babel/helper-plugin-utils': 7.16.7 + 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 +1192,20 @@ packages: '@babel/helper-plugin-utils': 7.16.7 dev: true + /@babel/plugin-transform-typescript/7.16.8_@babel+core@7.17.9: + resolution: {integrity: sha512-bHdQ9k7YpBDO2d0NVfkj51DpQcvwIzIusJ7mEUaMlbZq3Kt/U47j24inXZHQ5MDiYpCs+oZiwnXyKedE8+q7AQ==} + 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.17.9_@babel+core@7.17.9 + '@babel/helper-plugin-utils': 7.16.7 + '@babel/plugin-syntax-typescript': 7.17.10_@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'} @@ -1415,8 +1460,8 @@ packages: - supports-color dev: true - /@intlify/bundle-utils/3.0.0_vue-i18n@9.1.10: - resolution: {integrity: sha512-y43Z5Q3ZJvxqtD8xUH6U3yrlZeay7ZTqkzv1GQ4b0mGQtk5uptOT9Ra4qvGuUv8QyPQsortrA/OHWUD5ax5ZNQ==} + /@intlify/bundle-utils/3.1.0_vue-i18n@9.1.10: + resolution: {integrity: sha512-ghlJ0kR2cCQ8D+poKknC0Xx0ncOt3J3os7CcIAqqIWVF7k6AtGoCDnIru+YzlZcvFRNmP9wEZ7jKliojCdAWNg==} engines: {node: '>= 12'} peerDependencies: petite-vue-i18n: '*' @@ -1508,7 +1553,7 @@ packages: vue-i18n: optional: true dependencies: - '@intlify/bundle-utils': 3.0.0_vue-i18n@9.1.10 + '@intlify/bundle-utils': 3.1.0_vue-i18n@9.1.10 '@intlify/shared': 9.2.0-beta.35 '@rollup/pluginutils': 4.2.1 debug: 4.3.4 @@ -2039,6 +2084,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.16.7_@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: @@ -2594,6 +2660,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 @@ -3422,6 +3493,12 @@ packages: dev: true optional: true + /esbuild-node-loader/0.6.5: + resolution: {integrity: sha512-uPP+dllWm38cFvDysdocutN3lfe5pTIbddAHp1ENyLzpHYqE2r+3Wo+pfg9X3p8DFWwzIisft5YkeBIthIcixw==} + dependencies: + esbuild: 0.14.36 + dev: true + /esbuild-openbsd-64/0.14.36: resolution: {integrity: sha512-NvGB2Chf8GxuleXRGk8e9zD3aSdRO5kLt9coTQbCg7WMGXeX471sBgh4kSg8pjx0yTXRt0MlrUDnjVYnetyivg==} engines: {node: '>=12'} @@ -3431,6 +3508,14 @@ packages: dev: true optional: true + /esbuild-register/3.3.2_esbuild@0.14.36: + resolution: {integrity: sha512-jceAtTO6zxPmCfSD5cBb3rgIK1vmuqCKYwgylHiS1BF4pq0jJiJb4K2QMuqF4BEw7XDBRatYzip0upyTzfkgsQ==} + peerDependencies: + esbuild: '>=0.12 <1' + dependencies: + esbuild: 0.14.36 + dev: true + /esbuild-sunos-64/0.14.36: resolution: {integrity: sha512-VkUZS5ftTSjhRjuRLp+v78auMO3PZBXu6xl4ajomGenEm2/rGuWlhFSjB7YbBNErOchj51Jb2OK8lKAo8qdmsQ==} engines: {node: '>=12'} @@ -3831,6 +3916,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.36 + esbuild-node-loader: 0.6.5 + esbuild-register: 3.3.2_esbuild@0.14.36 + import-meta-resolve: 1.1.1 + dev: true + /espree/6.2.1: resolution: {integrity: sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==} engines: {node: '>=6.0.0'} @@ -4424,6 +4520,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: @@ -4543,6 +4644,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'} @@ -6205,6 +6312,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: @@ -6479,6 +6590,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 @@ -7000,6 +7115,25 @@ packages: - supports-color dev: true + /vite-plugin-vue-inspector/0.5.6_vite@2.9.7: + resolution: {integrity: sha512-/0sc7NKc0kJk4vd9GIBefA3WRGpYKSxF/ZqQIhJiz0N1ovsV6qGtuLVLo34/tkkibDm2WVN2z/yTTAkuyKvVcg==} + 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.16.8_@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 + magic-string: 0.26.1 + shell-quote: 1.7.3 + vite: 2.9.7 + transitivePeerDependencies: + - supports-color + dev: true + /vite-plugin-vue-layouts/0.6.0_cy27blvoe2cwdzwso5wue736a4: resolution: {integrity: sha512-7QX7o/NpCfs+hyXphwYfmPqAEQ6qd4uXsvI0VsovjGT2eCoEE5dMdP6L+uqqNWY4uqv7oCvtinecZmbzZv/9Rg==} peerDependencies: diff --git a/vite.config.ts b/vite.config.ts index 9028c70..ed7217a 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,10 @@ 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({ + enabled: false, + }), ], // https://github.com/antfu/vite-ssg