Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: order aliases from specific to general #45

Merged
merged 3 commits into from
Aug 5, 2022
Merged

Conversation

danielroe
Copy link
Member

Currently aliases are resolved from top down, so stream/web is (for example) resolved as unenv/runtime/node/stream/index/web rather than unenv/runtime/node/stream/web/index.

This PR reorders aliases so the more specific ones are at the top. Alternatively, we could use a helper function to do this for us.

unjs/nitro#378

@danielroe danielroe added the bug Something isn't working label Aug 5, 2022
@danielroe danielroe requested a review from pi0 August 5, 2022 14:01
@danielroe danielroe self-assigned this Aug 5, 2022
@pi0
Copy link
Member

pi0 commented Aug 5, 2022

We might normalize and sort them in env.ts#L18 once when generating preset.

src/env.ts Outdated Show resolved Hide resolved
@danielroe danielroe requested a review from pi0 August 5, 2022 15:42
@pi0 pi0 merged commit 9c11eaa into main Aug 5, 2022
@pi0 pi0 deleted the fix/alias-ordering branch August 5, 2022 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants