Note: the socket.io.js file is the generated output of make socket.io.js, and should not be manually modified.
The kind of change this PR does introduce
[x] a bug fix
[ ] a new feature
[ ] an update to the documentation
[ ] a code change that improves performance
[ ] other
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.
Note: the
socket.io.js
file is the generated output ofmake socket.io.js
, and should not be manually modified.The kind of change this PR does introduce
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.