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

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

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

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

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

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

@danielroedanielroe 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 pi0October 25, 2022 06:32
@danielroedanielroe self-assigned this Oct 25, 2022
@codesandbox

Copy link
Copy Markdown

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

@netlify

netlifyBot commented Oct 25, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commitf70ee81
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/63578e0ac64ad30009c945b2

Comment threadpackages/kit/src/resolve.ts Outdated
alias = tryUseNuxt()?.options.alias || {}
}
for (const key in normalizeAliases(alias)) {
if (key === '@' && !path.startsWith('@/')) { continue } // Don't resolve @foo/bar

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

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 mainOct 25, 2022
@pi0
pi0 deleted the fix/pathe-resolve-alias branch October 25, 2022 08:24
@pi0pi0 mentioned this pull request Nov 3, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't workingkit🔨 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.

[kit] resolveAlias should sort keys by length first

3 participants

@danielroe@atinux@pi0