fix(node): move browser and react-native export conditions lower#2627
fix(node): move browser and react-native export conditions lower#2627kettanaito merged 1 commit intomswjs:mainfrom
browser and react-native export conditions lower#2627Conversation
Moved the "node" and "react-native" export definitions lower in the exports map. This fixes the "No known conditions for './node' specifier" error (mswjs#2545)
node and react-native export conditions lower
node and react-native export conditions lowerbrowser and react-native export conditions lower
| "types": "./lib/node/index.d.mts", | ||
| "default": "./lib/node/index.mjs" | ||
| }, | ||
| "browser": null, |
There was a problem hiding this comment.
I'm just worried that some browser environments might false-positively match some of the preceding conditions, like module.
@markerikson, hi! Sorry for a direct ping. May I ask for your wisdom on this change? Do you see any unexpected behaviors this would cause for browsers importing the /node path?
There was a problem hiding this comment.
I'm actually not sure I've seen use of a null value for a condition before, but then again I also stopped trying to think about this after we got the RTK packages in shape :)
I don't have a good answer here, but looking at the issue thread it sounds like this helps. Worth a shot?
There was a problem hiding this comment.
Thanks! Appreciate your input. I also no see any dangers with this, so release it is!
kettanaito
left a comment
There was a problem hiding this comment.
Thank you for fixing this, @vidschofelix 🚀
Released: v2.12.2 🎉This has been released in v2.12.2. Get these changes by running the following command: Predictable release automation by Release. |
Moved the "node" and "react-native" export definitions lower in the exports map.
This fixes the "No known conditions for './node' specifier" error.