mirror of
https://github.com/sunniejs/vue-h5-template.git
synced 2025-04-05 07:03:01 +08:00
23 lines
487 B
TypeScript
23 lines
487 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': [],
|
|
},
|
|
],
|
|
resolvers: [VarletUIResolver(), VantResolver()],
|
|
});
|
|
};
|