I moved types condition to the front. package.json#exports are order-sensitive - they are always matched from the top to the bottom. When a match is found then it should be used and no further matching should occur.
Right now, the current setup works in TypeScript but it's considered a bug and it should not be relied upon, see the thread and the comment here. For that reason, I would like to fix all popular packages that misconfigured their exports this way so the bug can be fixed in TypeScript.
This matches how types were already configured for the rest of your entrypoints, this one was the single outlier
Coverage: 88.864%. Remained the same when pulling b30ba4d54d9416afea22d381ae0f8a9fd77f2a95 on Andarist:fix/types-condition into 97d9afc48c6e2ef0f6240842700251b8b6e64cd9 on fkhadra:main.
I moved
types
condition to the front.package.json#exports
are order-sensitive - they are always matched from the top to the bottom. When a match is found then it should be used and no further matching should occur.Right now, the current setup works in TypeScript but it's considered a bug and it should not be relied upon, see the thread and the comment here. For that reason, I would like to fix all popular packages that misconfigured their
exports
this way so the bug can be fixed in TypeScript.This matches how
types
were already configured for the rest of your entrypoints, this one was the single outlier