Skip to content

Commit

Permalink
Merge branch 'main' into refactor/vite6-sass-theme
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxian521 committed Nov 4, 2024
2 parents 8e04a05 + 66f5d6d commit ec04529
Show file tree
Hide file tree
Showing 3 changed files with 366 additions and 336 deletions.
14 changes: 11 additions & 3 deletions build/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { viteBuildInfo } from "./info";
import svgLoader from "vite-svg-loader";
import type { PluginOption } from "vite";
import vueJsx from "@vitejs/plugin-vue-jsx";
import Inspector from "vite-plugin-vue-inspector";
import { configCompressPlugin } from "./compress";
import removeNoMatch from "vite-plugin-router-warn";
import { visualizer } from "rollup-plugin-visualizer";
import removeConsole from "vite-plugin-remove-console";
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite";
import { codeInspectorPlugin } from "code-inspector-plugin";
import { vitePluginFakeServer } from "vite-plugin-fake-server";

export function getPluginsList(
Expand All @@ -25,8 +25,16 @@ export function getPluginsList(
VueI18nPlugin({
include: [pathResolve("../locales/**")]
}),
// 按下Command(⌘)+Shift(⇧),然后点击页面元素会自动打开本地IDE并跳转到对应的代码位置
Inspector(),
/**
* 在页面上按住组合键时,鼠标在页面移动即会在 DOM 上出现遮罩层并显示相关信息,点击一下将自动打开 IDE 并将光标定位到元素对应的代码位置
* Mac 默认组合键 Option + Shift
* Windows 默认组合键 Alt + Shift
* 更多用法看 https://inspector.fe-dev.cn/guide/start.html
*/
codeInspectorPlugin({
bundler: "vite",
hideConsole: true
}),
viteBuildInfo(),
/**
* 开发环境下移除非必要的vue-router动态路由警告No match found for location with path
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
"@vitejs/plugin-vue-jsx": "^4.0.1",
"autoprefixer": "^10.4.20",
"boxen": "^8.0.1",
"code-inspector-plugin": "^0.17.7",
"cssnano": "^7.0.6",
"dagre": "^0.8.5",
"eslint": "^9.14.0",
Expand All @@ -158,13 +159,12 @@
"svgo": "^3.3.2",
"tailwindcss": "^3.4.14",
"typescript": "^5.6.3",
"vite": "6.0.0-beta.7",
"vite": "6.0.0-beta.8",
"vite-plugin-cdn-import": "^1.0.1",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-fake-server": "^2.1.2",
"vite-plugin-remove-console": "^2.2.0",
"vite-plugin-router-warn": "^1.0.0",
"vite-plugin-vue-inspector": "^5.2.0",
"vite-svg-loader": "^5.1.0",
"vue-eslint-parser": "^9.4.3",
"vue-tsc": "^2.1.10"
Expand Down
Loading

0 comments on commit ec04529

Please sign in to comment.