You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
698 B
20 lines
698 B
import AutoImport from 'unplugin-auto-import/vite';
|
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
|
|
|
|
export default (path: any) => {
|
|
return AutoImport({
|
|
// 自动导入 Vue 相关函数
|
|
imports: ['vue', 'vue-router', '@vueuse/core', 'pinia'],
|
|
eslintrc: {
|
|
enabled: true,
|
|
filepath: './.eslintrc-auto-import.json',
|
|
globalsPropValue: true
|
|
},
|
|
resolvers: [
|
|
// 自动导入 Element Plus 相关函数ElMessage, ElMessageBox... (带样式)
|
|
ElementPlusResolver()
|
|
],
|
|
vueTemplate: true, // 是否在 vue 模板中自动导入
|
|
dts: path.resolve(path.resolve(__dirname, '../../src'), 'types', 'auto-imports.d.ts')
|
|
});
|
|
};
|
|
|