Skip to content

Commit

Permalink
feat: add vite pulgin dev inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
xsf0105 committed Sep 2, 2024
1 parent 6397157 commit 6ad9f95
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 0 deletions.
135 changes: 135 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down Expand Up @@ -84,6 +86,9 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
plugins: [
vue(),
vueJsx(),
inspector({
toggleButtonVisibility: 'always',
}),
/** 将 SVG 静态图转化为 Vue 组件 */
svgLoader({ defaultImport: "url" }),
/** SVG */
Expand Down

0 comments on commit 6ad9f95

Please sign in to comment.