basic2/vite/plugins/auto-import.ts
2022-09-26 00:21:50 +08:00

20 lines
410 B
TypeScript

import autoImport from 'unplugin-auto-import/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
export default function createAutoImport() {
return autoImport({
imports: [
'vue',
'vue-router',
'pinia',
],
dts: 'src/auto-imports.d.ts',
dirs: [
'./src/utils/composables/**',
],
resolvers: [
ElementPlusResolver(),
],
})
}