resolvers icon indicating copy to clipboard operation
resolvers copied to clipboard

chore(exports): improve nested conditions

Open balzdur opened this issue 3 years ago • 4 comments

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

balzdur avatar Jun 07 '22 10:06 balzdur

Thank very much for looking into this ❤️

bluebill1049 avatar Jun 07 '22 11:06 bluebill1049

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.

balzdur avatar Jun 07 '22 13:06 balzdur

thanks for the update, that would be a blocker for now once that issue is getting resolved then.

bluebill1049 avatar Jun 07 '22 13:06 bluebill1049

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?

david-bezero avatar Jul 20 '22 15:07 david-bezero

I close this since https://github.com/react-hook-form/resolvers/pull/435 is merged and definitively solve the issue 🎉

Thanks 🙏🏽

balzdur avatar Sep 12 '22 10:09 balzdur