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

fix(kit): normalize (sort) aliases before resolving #7018

Merged
merged 1 commit into from
Aug 29, 2022
Merged

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've already improved Nitro alias handling with some utils from pathe: unjs/pathe#34.

This PR does the same before resolving aliases with kit. (Meaning it can be used with Bridge also.) We can also look at normalizing aliases we pass to vite + webpack in a follow-up PR, but that probably needs a little more testing.

πŸ“ 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 Aug 29, 2022
@danielroe danielroe requested a review from pi0 August 29, 2022 08:31
@danielroe danielroe self-assigned this Aug 29, 2022
@netlify
Copy link

netlify bot commented Aug 29, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 022a084
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/630c7969c983d20008715c4d

@pi0 pi0 merged commit 33d82b6 into main Aug 29, 2022
@pi0 pi0 deleted the fix/sort-aliases branch August 29, 2022 09:45
@pi0 pi0 mentioned this pull request Sep 1, 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.

[kit] resolveAlias should sort keys by length first
2 participants