Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: when using glob with relative path get wrong component name #780

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alt1o
Copy link

@alt1o alt1o commented Jul 4, 2024

Description

When using glob with relative path, get wrong component name for index.vue

Using pnpm init a monorepo project. Place UI components in /libs/ui, but run vite in project folder.

Project structure

floder
|--projects
     |--website
          |--vite.config.ts
|--libs
     |--ui
          |--Button
               |--index.vue

Config like this:

import Components from 'unplugin-vue-components/vite';

Components({
      globs: ['../../libs/ui/**/*.vue'],
}),

Got wrong component name: undefined.

@alt1o alt1o requested a review from antfu as a code owner July 4, 2024 09:18
Copy link

stackblitz bot commented Jul 4, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant