lis8.0-vue3/vite/plugins/auto-import.js

14 lines
379 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import autoImport from 'unplugin-auto-import/vite'
export default function createAutoImport() {
return autoImport({
imports: [
'vue',
'vue-router',
'pinia'
],
// 2. 生成类型声明文件(解决TS类型报错)
dts: 'src/auto-imports.d.ts', // 生成的.d.ts文件路径(会自动创建)
})
}