Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): allow auto-import component with same filename #7713

Merged
merged 2 commits into from
Oct 3, 2022

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves nuxt/nuxt#14990

❓ 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 like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Within a file named Foo/Bar.vue if it resolves <Bar />, Vue will pass a second param to resolveComponent, which our regexp didn't allow for. This PR allows resolving <Bar /> from auto-imports in this case. If <Bar /> doesn't exist, it will fall back to the Vue behaviour that allows use of recursive components in this way.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added bug Something isn't working πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Sep 21, 2022
@danielroe danielroe requested a review from antfu September 21, 2022 09:34
@danielroe danielroe self-assigned this Sep 21, 2022
@codesandbox
Copy link

codesandbox bot commented Sep 21, 2022

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify
Copy link

netlify bot commented Sep 21, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 53be5b8
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/63331bfa2a75750009943409

@danielroe danielroe requested a review from pi0 September 27, 2022 15:51
@atinux atinux merged commit a3fd419 into main Oct 3, 2022
@atinux atinux deleted the fix/recursive-resolve branch October 3, 2022 13:38
@danielroe danielroe mentioned this pull request Oct 9, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x bug Something isn't working πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto Imports don't work as expected with SubFolders
3 participants