resolvers
resolvers copied to clipboard
chore(exports): improve nested conditions
This proposal follow this issue.
After digging a little bit in the linked issues, I found this issue where this particular comment give an hint on how to solve this module resolution issue.
If I well understood reading the Jest 28 doc we need to provide both require and import exports for browser too.
Further reading on the "exports" spec
NB: This change in local raise the issue in this issue.
close #396
Thank very much for looking into this ❤️
FYI, the failure consist in the CI check of exports map. I've raised an issue on the package maintainer of this "check" to understand if there is any reason to disallow nested conditions.
thanks for the update, that would be a blocker for now once that issue is getting resolved then.
I do not believe this project actually needs the "browser" vs "node" distinction in the first place (see my PR which I created before seeing this one: https://github.com/react-hook-form/resolvers/pull/435)
Distinguishing between browser and node environments is only needed if you actually want to run different code in each, but from what I can tell, this project just copies the same file for both targets. Maybe I've missed something?
I close this since https://github.com/react-hook-form/resolvers/pull/435 is merged and definitively solve the issue 🎉
Thanks 🙏🏽