arcoResolver.ts 804 B

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