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

fix(kit): use pathe to resolve aliases#8453

Merged
pi0 merged 2 commits intomainfrom
fix/pathe-resolve-alias
Oct 25, 2022
Merged

fix(kit): use pathe to resolve aliases#8453
pi0 merged 2 commits intomainfrom
fix/pathe-resolve-alias

Conversation

@danielroe
Copy link
Member

🔗 Linked issue

resolves nuxt/nuxt#14735

❓ 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

We have some upstream fixes in pathe/utils that we can take advantage of in kit.

📝 Checklist

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

@danielroe danielroe added bug Something isn't working kit 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Oct 25, 2022
@danielroe danielroe requested a review from pi0 October 25, 2022 06:32
@danielroe danielroe self-assigned this Oct 25, 2022
@codesandbox
Copy link

codesandbox bot commented Oct 25, 2022

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

@netlify
Copy link

netlify bot commented Oct 25, 2022

Deploy Preview for nuxt3-docs canceled.

Name Link
🔨 Latest commit f70ee81
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/63578e0ac64ad30009c945b2

alias = tryUseNuxt()?.options.alias || {}
}
for (const key in normalizeAliases(alias)) {
if (key === '@' && !path.startsWith('@/')) { continue } // Don't resolve @foo/bar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that we have removed @ and @/ check from pathe util

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we now respect path separate which should do the same thing.

@pi0 pi0 merged commit 54da6f8 into main Oct 25, 2022
@pi0 pi0 deleted the fix/pathe-resolve-alias branch October 25, 2022 08:24
@pi0 pi0 mentioned this pull request Nov 3, 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 kit 🔨 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.

[kit] resolveAlias should sort keys by length first

3 participants