From e1f385f36a3df33eb53a310561059d16ab2466a2 Mon Sep 17 00:00:00 2001 From: warmthsea <2586244885@qq.com> Date: Wed, 29 May 2024 10:12:05 +0800 Subject: [PATCH] chore: add Inspector(developer open vscode) --- build/plugins.ts | 3 ++ package.json | 1 + pnpm-lock.yaml | 72 ++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 67 insertions(+), 9 deletions(-) diff --git a/build/plugins.ts b/build/plugins.ts index 04568ac6e..e6caa4def 100644 --- a/build/plugins.ts +++ b/build/plugins.ts @@ -13,6 +13,7 @@ import { themePreprocessorPlugin } from "@pureadmin/theme"; import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite"; import { genScssMultipleScopeVars } from "../src/layout/theme"; import { vitePluginFakeServer } from "vite-plugin-fake-server"; +import Inspector from "vite-plugin-vue-inspector"; export function getPluginsList( VITE_CDN: boolean, @@ -28,6 +29,8 @@ export function getPluginsList( include: [pathResolve("../locales/**")] }), viteBuildInfo(), + // 选中DOM 打开IDE + Inspector(), /** * 开发环境下移除非必要的vue-router动态路由警告No match found for location with path * 非必要具体看 https://github.com/vuejs/router/issues/521 和 https://github.com/vuejs/router/issues/359 diff --git a/package.json b/package.json index 68ef60369..762735f32 100644 --- a/package.json +++ b/package.json @@ -166,6 +166,7 @@ "vite-plugin-fake-server": "^2.1.1", "vite-plugin-remove-console": "^2.2.0", "vite-plugin-router-warn": "^1.0.0", + "vite-plugin-vue-inspector": "^5.1.2", "vite-svg-loader": "^5.1.0", "vue-eslint-parser": "^9.4.2", "vue-tsc": "^1.8.27" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 20f2ee7cc..e03441d0d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -360,6 +360,9 @@ importers: vite-plugin-router-warn: specifier: ^1.0.0 version: 1.0.0 + vite-plugin-vue-inspector: + specifier: ^5.1.2 + version: 5.1.2(vite@5.2.11(@types/node@20.12.12)(sass@1.77.2)) vite-svg-loader: specifier: ^5.1.0 version: 5.1.0(vue@3.4.27(typescript@5.4.5)) @@ -494,6 +497,12 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/plugin-proposal-decorators@7.24.6': + resolution: {integrity: sha512-8DjR0/DzlBhz2SVi9a19/N2U5+C3y3rseXuyoKL9SP8vnbewscj1eHZtL6kpEn4UCuUmqEo0mvqyDYRFoN2gpA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-async-generators@7.8.4': resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: @@ -509,6 +518,18 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-decorators@7.24.6': + resolution: {integrity: sha512-gInH8LEqBp+wkwTVihCd/qf+4s28g81FZyvlIbAurHk9eSiItEKG7E0uNK2UdpgsD79aJVAW3R3c85h0YJ0jsw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-import-attributes@7.24.6': + resolution: {integrity: sha512-D+CfsVZousPXIdudSII7RGy52+dYRtbyKAZcvtQKq/NpsivyMVduepzcLqG5pMBugtMdedxdC8Ramdpcne9ZWQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-import-meta@7.10.4': resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: @@ -1276,55 +1297,46 @@ packages: resolution: {integrity: sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==} cpu: [arm] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.18.0': resolution: {integrity: sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==} cpu: [arm] os: [linux] - libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.18.0': resolution: {integrity: sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==} cpu: [arm64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.18.0': resolution: {integrity: sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==} cpu: [arm64] os: [linux] - libc: [musl] '@rollup/rollup-linux-powerpc64le-gnu@4.18.0': resolution: {integrity: sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==} cpu: [ppc64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.18.0': resolution: {integrity: sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==} cpu: [riscv64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.18.0': resolution: {integrity: sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==} cpu: [s390x] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.18.0': resolution: {integrity: sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-musl@4.18.0': resolution: {integrity: sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==} cpu: [x64] os: [linux] - libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.18.0': resolution: {integrity: sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==} @@ -3465,6 +3477,9 @@ packages: known-css-properties@0.31.0: resolution: {integrity: sha512-sBPIUGTNF0czz0mwGGUoKKJC8Q7On1GPbCSFPfyEsfHb2DyBG0Y4QtV+EVWpINSaiGKZblDNuF5AezxSgOhesQ==} + kolorist@1.8.0: + resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} + leven@2.1.0: resolution: {integrity: sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA==} engines: {node: '>=0.10.0'} @@ -5161,6 +5176,11 @@ packages: vite-plugin-router-warn@1.0.0: resolution: {integrity: sha512-jnr7faHJPkKxukBXVpg7Ui1UDqhmxD7xU6JGidq8ivSHTsNAPqzSpPpwW8O1PBP/0+Owq4bLfNNk11drOkz4xA==} + vite-plugin-vue-inspector@5.1.2: + resolution: {integrity: sha512-M+yH2LlQtVNzJAljQM+61CqDXBvHim8dU5ImGaQuwlo13tMDHue5D7IC20YwDJuWDODiYc/cZBUYspVlyPf2vQ==} + peerDependencies: + vite: ^3.0.0-0 || ^4.0.0-0 || ^5.0.0-0 + vite-svg-loader@5.1.0: resolution: {integrity: sha512-M/wqwtOEjgb956/+m5ZrYT/Iq6Hax0OakWbokj8+9PXOnB7b/4AxESHieEtnNEy7ZpjsjYW1/5nK8fATQMmRxw==} peerDependencies: @@ -5659,6 +5679,13 @@ snapshots: dependencies: '@babel/types': 7.24.6 + '@babel/plugin-proposal-decorators@7.24.6(@babel/core@7.24.6)': + dependencies: + '@babel/core': 7.24.6 + '@babel/helper-create-class-features-plugin': 7.24.6(@babel/core@7.24.6) + '@babel/helper-plugin-utils': 7.24.6 + '@babel/plugin-syntax-decorators': 7.24.6(@babel/core@7.24.6) + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.6)': dependencies: '@babel/core': 7.24.6 @@ -5674,6 +5701,16 @@ snapshots: '@babel/core': 7.24.6 '@babel/helper-plugin-utils': 7.24.6 + '@babel/plugin-syntax-decorators@7.24.6(@babel/core@7.24.6)': + dependencies: + '@babel/core': 7.24.6 + '@babel/helper-plugin-utils': 7.24.6 + + '@babel/plugin-syntax-import-attributes@7.24.6(@babel/core@7.24.6)': + dependencies: + '@babel/core': 7.24.6 + '@babel/helper-plugin-utils': 7.24.6 + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.6)': dependencies: '@babel/core': 7.24.6 @@ -9224,6 +9261,8 @@ snapshots: known-css-properties@0.31.0: {} + kolorist@1.8.0: {} + leven@2.1.0: {} leven@3.1.0: {} @@ -10951,6 +10990,21 @@ snapshots: vite-plugin-router-warn@1.0.0: {} + vite-plugin-vue-inspector@5.1.2(vite@5.2.11(@types/node@20.12.12)(sass@1.77.2)): + dependencies: + '@babel/core': 7.24.6 + '@babel/plugin-proposal-decorators': 7.24.6(@babel/core@7.24.6) + '@babel/plugin-syntax-import-attributes': 7.24.6(@babel/core@7.24.6) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.24.6) + '@babel/plugin-transform-typescript': 7.24.6(@babel/core@7.24.6) + '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.24.6) + '@vue/compiler-dom': 3.4.27 + kolorist: 1.8.0 + magic-string: 0.30.10 + vite: 5.2.11(@types/node@20.12.12)(sass@1.77.2) + transitivePeerDependencies: + - supports-color + vite-svg-loader@5.1.0(vue@3.4.27(typescript@5.4.5)): dependencies: svgo: 3.3.2