feat: 增加 code-inspector-plugin
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
"amfe-flexible": "^2.2.1",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"babel-loader": "^10.0.0",
|
||||
"code-inspector-plugin": "^0.20.10",
|
||||
"husky": "^9.1.5",
|
||||
"npm-run-all2": "^6.2.0",
|
||||
"postcss": "^8.5.3",
|
||||
|
||||
@@ -8,6 +8,9 @@ import Components from 'unplugin-vue-components/vite';
|
||||
import { ElementPlusResolver, VantResolver } from 'unplugin-vue-components/resolvers';
|
||||
import postCssPxToRem from 'postcss-pxtorem';
|
||||
import legacy from '@vitejs/plugin-legacy';
|
||||
// shift + alt 快速定位到对应组件
|
||||
import { codeInspectorPlugin } from 'code-inspector-plugin';
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
// 接收 mode 参数
|
||||
// 正确加载环境变量
|
||||
@@ -69,7 +72,10 @@ export default defineConfig(({ mode }) => {
|
||||
legacy({
|
||||
targets: ['ie >= 11', 'chrome >= 49', 'safari >= 11.1'],
|
||||
additionalLegacyPolyfills: ['regenerator-runtime/runtime']
|
||||
})
|
||||
}),
|
||||
codeInspectorPlugin({
|
||||
bundler: 'vite',
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
|
||||
Reference in New Issue
Block a user