w 8372de6eca fix: 🐛 修改编辑器引入unplugin-auto-import 的api,在编辑器红色报错提示
修改编辑器引入unplugin-auto-import 的api,在编辑器红色报错提示
2023-04-29 11:14:34 +08:00

26 lines
531 B
TypeScript

/**
* @name AutoImportDeps
* @description 按需加载,自动引入
*/
import AutoImport from 'unplugin-auto-import/vite';
import { VarletUIResolver, VantResolver } from 'unplugin-vue-components/resolvers';
export const AutoImportDeps = () => {
return AutoImport({
dts: 'types/auto-imports.d.ts',
imports: [
'vue',
'pinia',
'vue-router',
{
'@vueuse/core': [],
},
],
eslintrc: {
enabled: true,
},
resolvers: [VarletUIResolver(), VantResolver()],
});
};