refactor: 自动导入优化

Former-commit-id: 58d497c07290fa220dfe125bad433b49c68e89da
This commit is contained in:
haoxr
2023-02-07 01:08:11 +08:00
parent 5827ae64f4
commit 9c347f7be8
2 changed files with 18 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
// 自动导入 Vue 相关函数ref, reactive, toRef 等
imports: ['vue', '@vueuse/core'],
eslintrc: {
enabled: false,
enabled: false, // 没有此json文件开启生成后关闭
filepath: './.eslintrc-auto-import.json',
globalsPropValue: true
},
@@ -98,6 +98,19 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
// 指定symbolId格式
symbolId: 'icon-[dir]-[name]'
})
]
],
optimizeDeps: {
include: [
'vue',
'vue-router',
'element-plus/es/locale/lang/zh-cn',
'element-plus/es/locale/lang/en',
'@vueuse/core',
'axios',
'echarts',
'@wangeditor/editor',
'@wangeditor/editor-for-vue'
]
}
};
});