Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

配置globs丢失directoryAsNamespace能力 #573

Closed
5 tasks done
UphkcRNqmafQWcSSSSSS opened this issue Jan 5, 2023 · 0 comments
Closed
5 tasks done

配置globs丢失directoryAsNamespace能力 #573

UphkcRNqmafQWcSSSSSS opened this issue Jan 5, 2023 · 0 comments

Comments

@UphkcRNqmafQWcSSSSSS
Copy link

Describe the bug

// vite:4.0.4
// unplugin-vue-components:0.22.12
Components({
  globs: ['src/components/**!(/components/)*.{vue,}'],
  directoryAsNamespace: true
})

// 结果
declare module '@vue/runtime-core' {
  export interface GlobalComponents {
    Demo: typeof import('./src/components/test/demo/demo.vue')['default']
    HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
    IconCommunity: typeof import('./src/components/icons/IconCommunity.vue')['default']
    IconDocumentation: typeof import('./src/components/icons/IconDocumentation.vue')['default']
    IconEcosystem: typeof import('./src/components/icons/IconEcosystem.vue')['default']
    IconSupport: typeof import('./src/components/icons/IconSupport.vue')['default']
    IconTooling: typeof import('./src/components/icons/IconTooling.vue')['default']
    RouterLink: typeof import('vue-router')['RouterLink']
    RouterView: typeof import('vue-router')['RouterView']
    Test: typeof import('./src/components/test/test.vue')['default']
    TheWelcome: typeof import('./src/components/TheWelcome.vue')['default']
    WelcomeItem: typeof import('./src/components/WelcomeItem.vue')['default']
  }
}
Components({
  // globs: ['src/components/**!(/components/)*.{vue,}'],
  directoryAsNamespace: true
})

// 结果
declare module '@vue/runtime-core' {
  export interface GlobalComponents {
    HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
    IconsIconCommunity: typeof import('./src/components/icons/IconCommunity.vue')['default']
    IconsIconDocumentation: typeof import('./src/components/icons/IconDocumentation.vue')['default']
    IconsIconEcosystem: typeof import('./src/components/icons/IconEcosystem.vue')['default']
    IconsIconSupport: typeof import('./src/components/icons/IconSupport.vue')['default']
    IconsIconTooling: typeof import('./src/components/icons/IconTooling.vue')['default']
    RouterLink: typeof import('vue-router')['RouterLink']
    RouterView: typeof import('vue-router')['RouterView']
    TestComponents: typeof import('./src/components/test/components/index.vue')['default']
    TestDemoDemo: typeof import('./src/components/test/demo/demo.vue')['default']
    TestTest: typeof import('./src/components/test/test.vue')['default']
    TheWelcome: typeof import('./src/components/TheWelcome.vue')['default']
    WelcomeItem: typeof import('./src/components/WelcomeItem.vue')['default']
  }
}

Reproduction

null

System Info

System:
  OS: macOS 12.6.2
  CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Memory: 392.73 MB / 16.00 GB
  Shell: 5.8.1 - /bin/zsh
Binaries:
  Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
  Yarn: 1.22.18 - ~/.nvm/versions/node/v16.15.0/bin/yarn
  npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
  Watchman: 2022.03.21.00 - /usr/local/bin/watchman
Browsers:
  Chrome: 108.0.5359.124
  Firefox: 100.0.2
  Safari: 16.2

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant