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

fix(runtime-utils): pass custom global components to mountSuspended #1081

Merged
merged 1 commit into from
Jan 18, 2025

Conversation

tobiasdcl
Copy link
Contributor

πŸ”— Linked issue

resolves #1080

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Custom vue components, typically added through a nuxt plugin, are not available in the testing environment.

sample:

export default defineNuxtPlugin(nuxtApp => {
  nuxtApp.vueApp.component('font-awesome-icon', FontAwesomeIcon);
});

when running a test and mounting a component that uses <font-awesome-icon>:

[Vue warn]: Failed to resolve component: font-awesome-icon

Sorry, something went wrong.

@tobiasdcl tobiasdcl requested a review from danielroe as a code owner January 18, 2025 14:49
@danielroe danielroe merged commit 1a2f057 into nuxt:main Jan 18, 2025
4 checks passed
@danielroe
Copy link
Member

Thank you! ❀️

@github-actions github-actions bot mentioned this pull request Jan 18, 2025
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

Successfully merging this pull request may close these issues.

mountSuspended should consider any component added to the vue app
2 participants