You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
627 B

2 months ago
  1. /**
  2. * Introduces component library styles on demand.
  3. * https://github.com/antfu/unplugin-vue-components
  4. */
  5. import Components from 'unplugin-vue-components/vite'
  6. import ViteComponents, { VantResolver } from 'unplugin-vue-components/resolvers'
  7. export function configAutoComponentsPlugin() {
  8. return Components({
  9. // 指定组件位置,默认是src/components
  10. dirs: ['src/components'],
  11. extensions: ['vue', 'tsx'],
  12. // 配置文件生成位置
  13. dts: 'src/components.d.ts',
  14. // 搜索子目录
  15. deep: true,
  16. // 允许子目录作为组件的命名空间前缀。
  17. directoryAsNamespace: false
  18. // include:[]
  19. })
  20. }