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(defineEnv): fallback support for unenv-nightly #378

Merged
merged 2 commits into from
Dec 18, 2024
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Dec 18, 2024

This PR is a hotfix for defineEnv utility when it is running in an aliased unenv-nightly package and when package manager (pnpm) does not rename "name" field in package.json, it causes ESM resolution to fail.

Workaroud is to fallback to unenv/ => unenv-nightly/ and then id as-is.

@pi0 pi0 requested a review from vicb December 18, 2024 17:58
@pi0 pi0 marked this pull request as draft December 18, 2024 18:02
@pi0 pi0 marked this pull request as ready for review December 18, 2024 18:09
@vicb
Copy link
Contributor

vicb commented Dec 18, 2024

Thanks a lot ❤️

@pi0 pi0 merged commit 5d6aec3 into main Dec 18, 2024
2 checks passed
@pi0 pi0 deleted the fix/resolve-nightly branch December 18, 2024 18:33
@vicb
Copy link
Contributor

vicb commented Dec 22, 2024

@pi0 Can you think of a test that would fail reliably to test this? (I'd like to add this to wrangler)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants