Open piranna opened 3 years ago
Looks like the current behaviour just picks the first one from import or require. Probably needs to somehow determine which one should be used
ah, since Jest 27.2.0 it should be passing a conditions
array to the resolver that could be used for this
ah, since Jest 27.2.0 it should be passing a
conditions
array to the resolver that could be used for this
Yes, but it's not fully implemented, I still have my PR open to add support by default for the browser
and node
conditions.
When importing
ws
module, it gets the CommonJS version instead of the ESM one, although it has defined bothmain
andexports
fields. This last one has conditions for bothimport
andrequire
, in case is this the issue.