diff --git a/package-lock.json b/package-lock.json index bb6061b..0f357a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,6 +51,7 @@ "typescript": "5.5.4", "unocss": "0.62.2", "vite": "5.4.2", + "vite-plugin-dev-inspector": "^2.2.5", "vite-plugin-svg-icons": "2.0.1", "vite-svg-loader": "5.1.0", "vitest": "2.0.5", @@ -411,6 +412,65 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/plugin-proposal-decorators": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.24.7.tgz", + "integrity": "sha512-RL9GR0pUG5Kc8BUWLNDm2T5OpYwSX15r98I0IkgmRQTXuELq/OynH8xtMTMvTJFjXbMWFVTKtYkTaYQsuAwQlQ==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-decorators": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-decorators": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.24.7.tgz", + "integrity": "sha512-Ui4uLJJrRV1lb38zg1yYTmRKmiZLiftDEvZN2iq3kd9kUFU+PttmzTbAFC2ucRk/XJmtek6G23gPsuZbhrT8fQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz", + "integrity": "sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-jsx": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", @@ -10001,6 +10061,26 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/vite-plugin-dev-inspector": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/vite-plugin-dev-inspector/-/vite-plugin-dev-inspector-2.2.5.tgz", + "integrity": "sha512-sNRwlICw/d2XJsO8aazoSPYwrMu7Ig6YUxRafoi0Y+sWrvw49XexQEIvPvee8/hx7MG+GNsnMUYuDkcH7xlFPw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.0", + "@babel/plugin-proposal-decorators": "^7.23.0", + "@babel/plugin-syntax-import-attributes": "^7.22.5", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-transform-typescript": "^7.22.15", + "@vue/babel-plugin-jsx": "^1.1.5", + "@vue/compiler-dom": "^3.3.4", + "kolorist": "^1.8.0", + "magic-string": "^0.30.4" + }, + "peerDependencies": { + "vite": "^2.0.0-0 || ^3.0.0-0 || ^4.0.0-0 || ^5.0.0-0" + } + }, "node_modules/vite-plugin-svg-icons": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/vite-plugin-svg-icons/-/vite-plugin-svg-icons-2.0.1.tgz", @@ -11369,6 +11449,44 @@ "@babel/types": "^7.25.6" } }, + "@babel/plugin-proposal-decorators": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.24.7.tgz", + "integrity": "sha512-RL9GR0pUG5Kc8BUWLNDm2T5OpYwSX15r98I0IkgmRQTXuELq/OynH8xtMTMvTJFjXbMWFVTKtYkTaYQsuAwQlQ==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-decorators": "^7.24.7" + } + }, + "@babel/plugin-syntax-decorators": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.24.7.tgz", + "integrity": "sha512-Ui4uLJJrRV1lb38zg1yYTmRKmiZLiftDEvZN2iq3kd9kUFU+PttmzTbAFC2ucRk/XJmtek6G23gPsuZbhrT8fQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.24.7" + } + }, + "@babel/plugin-syntax-import-attributes": { + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz", + "integrity": "sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.24.8" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, "@babel/plugin-syntax-jsx": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", @@ -18338,6 +18456,23 @@ "vite": "^5.0.0" } }, + "vite-plugin-dev-inspector": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/vite-plugin-dev-inspector/-/vite-plugin-dev-inspector-2.2.5.tgz", + "integrity": "sha512-sNRwlICw/d2XJsO8aazoSPYwrMu7Ig6YUxRafoi0Y+sWrvw49XexQEIvPvee8/hx7MG+GNsnMUYuDkcH7xlFPw==", + "dev": true, + "requires": { + "@babel/core": "^7.23.0", + "@babel/plugin-proposal-decorators": "^7.23.0", + "@babel/plugin-syntax-import-attributes": "^7.22.5", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-transform-typescript": "^7.22.15", + "@vue/babel-plugin-jsx": "^1.1.5", + "@vue/compiler-dom": "^3.3.4", + "kolorist": "^1.8.0", + "magic-string": "^0.30.4" + } + }, "vite-plugin-svg-icons": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/vite-plugin-svg-icons/-/vite-plugin-svg-icons-2.0.1.tgz", diff --git a/package.json b/package.json index a87e499..bac810d 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "typescript": "5.5.4", "unocss": "0.62.2", "vite": "5.4.2", + "vite-plugin-dev-inspector": "^2.2.5", "vite-plugin-svg-icons": "2.0.1", "vite-svg-loader": "5.1.0", "vitest": "2.0.5", diff --git a/vite.config.ts b/vite.config.ts index 1675cb8..d14eab5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -7,6 +7,8 @@ import vueJsx from "@vitejs/plugin-vue-jsx" import { createSvgIconsPlugin } from "vite-plugin-svg-icons" import svgLoader from "vite-svg-loader" import UnoCSS from "unocss/vite" +import inspector from 'vite-plugin-dev-inspector' + /** 配置项文档:https://cn.vitejs.dev/config */ export default ({ mode }: ConfigEnv): UserConfigExport => { @@ -84,6 +86,9 @@ export default ({ mode }: ConfigEnv): UserConfigExport => { plugins: [ vue(), vueJsx(), + inspector({ + toggleButtonVisibility: 'always', + }), /** 将 SVG 静态图转化为 Vue 组件 */ svgLoader({ defaultImport: "url" }), /** SVG */