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

unplugin-vue-components conflict #3151

Closed
AQian0 opened this issue Jan 21, 2025 · 2 comments · Fixed by #3207
Closed

unplugin-vue-components conflict #3151

AQian0 opened this issue Jan 21, 2025 · 2 comments · Fixed by #3207
Assignees
Labels
bug Something isn't working v3 #1289 vue

Comments

@AQian0
Copy link

AQian0 commented Jan 21, 2025

Environment

  • Vue Version: 3.5.13
  • Package Mannger: bun
  • Bun Version: 1.1.45

Is this bug related to Nuxt or Vue?

Vue

Version

v3.0.0-alpha.11

Reproduction

https://codesandbox.io/p/devbox/morning-grass-t68z6n

Description

As shown in the example, components in Nuxt UI cannot be imported automatically.
When unplugin-vue-components is imported and used separately, the auto import in Nuxt UI is disabled.

However, unplugin-auto-import seems to work properly with Nuxt UI.

Additional context

No response

Logs

@AQian0 AQian0 added bug Something isn't working triage v3 #1289 labels Jan 21, 2025
@imamnf
Copy link

imamnf commented Jan 23, 2025

I'm having the same issue. Have you had any workaround?

@imamnf
Copy link

imamnf commented Jan 23, 2025

So I've been wandering around the source code. How do I say it...

Why is Nuxt UI not auto importing when there is already a separate installed unplugin-vue-components? Because Nuxt UI is wrapping unplugin-vue-components inside it, not as one of resolvers. So they create its own declaration.

Try to switch the order inside vite.config (UI first, then Components); then you will get the components.d.ts from Nuxt UI.

So my question is, how to merge the two of them? I don't know how to do it, and it seems complicated when you already have an option within your own unplugin-vue-components.

Anyway, thank you for providing the issues, and thank you to the Nuxt team for everything.

Sorry for my broken English, and if I made a mistake about the information I got from the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v3 #1289 vue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants