-
-
Notifications
You must be signed in to change notification settings - Fork 544
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: give node
export condition higher priority
#2134
Conversation
in case of mixed environments that look for both "node" and "browser" export conditions
node
condition high prioritynode
export condition higher priority
"types": "./lib/node/index.d.ts", | ||
"node": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do the same for /native
export too?
"types": "./lib/node/index.d.ts", | ||
"node": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, a reverse fix for /browser
? Adding a browser
field with a higher priority. Folks experience the reverse problem as well for msw/browser
.
@@ -115,6 +115,15 @@ function validateExportConditions(pointer, conditions) { | |||
return | |||
} | |||
|
|||
if (typeof relativeExportPath === 'object') { | |||
validateExportConditions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch! Thank you for spotting this. We didn't have any support for nested export conditions. This is nice ❇️
530dcdf
to
79ce316
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thank you, @phryneas! 🚀
Released: v2.2.14 🎉This has been released in v2.2.14! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |
in case of mixed environments that look for both
"node" and "browser" export conditions