basic2/vite/plugins/auto-import.js
2022-05-10 14:42:59 +08:00

30 lines
742 B
JavaScript

import autoImport from 'unplugin-auto-import/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
export default function createAutoImport() {
return autoImport({
imports: [
'vue',
'vue-router',
{
'vue': [
'defineProps',
'defineEmits',
'defineExpose',
'withDefaults'
]
},
'pinia'
],
eslintrc: {
enabled: true,
filepath: './.eslintrc-auto-import.json',
globalsPropValue: true
},
resolvers: [
ElementPlusResolver()
],
dts: false
})
}