2023-05-24 11:08:08 +08:00
|
|
|
|
/**
|
|
|
|
|
* If you use the template method for development, you can use the unplugin-vue-components plugin to enable on-demand loading support.
|
|
|
|
|
* 按需引入
|
|
|
|
|
* https://github.com/antfu/unplugin-vue-components
|
|
|
|
|
* https://arco.design/vue/docs/start
|
|
|
|
|
* Although the Pro project is full of imported components, this plugin will be used by default.
|
|
|
|
|
* 虽然Pro项目中是全量引入组件,但此插件会默认使用。
|
|
|
|
|
*/
|
|
|
|
|
import { ArcoResolver } from 'unplugin-vue-components/resolvers';
|
2023-10-17 10:35:21 +08:00
|
|
|
|
import Components from 'unplugin-vue-components/vite';
|
2023-05-24 11:08:08 +08:00
|
|
|
|
|
|
|
|
|
export default function configArcoResolverPlugin() {
|
|
|
|
|
const arcoResolverPlugin = Components({
|
|
|
|
|
dirs: [], // Avoid parsing src/components. 避免解析到src/components
|
|
|
|
|
deep: false,
|
|
|
|
|
resolvers: [ArcoResolver()],
|
|
|
|
|
});
|
|
|
|
|
return arcoResolverPlugin;
|
|
|
|
|
}
|