Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

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

Merged
atinux merged 2 commits into
mainfrom
fix/recursive-resolve
Oct 3, 2022
Merged

fix(nuxt): allow auto-import component with same filename#7713
atinux merged 2 commits into
mainfrom
fix/recursive-resolve

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/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.

@danielroedanielroe 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
@danielroedanielroe self-assigned this Sep 21, 2022
@codesandbox

Copy link
Copy Markdown

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

@netlify

netlifyBot commented Sep 21, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit53be5b8
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/63331bfa2a75750009943409

@danielroe
danielroe requested a review from pi0September 27, 2022 15:51
@atinux
atinux merged commit a3fd419 into mainOct 3, 2022
@atinux
atinux deleted the fix/recursive-resolve branch October 3, 2022 13:38
@danielroedanielroe mentioned this pull request Oct 9, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't working🔨 p3-minor-bugPriority 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

@danielroe@antfu@atinux