itgalaxy / favicons

Favicons generator for Node.js
MIT License
1.19k stars 164 forks source link

move `types` condition to the front #430

Closed Andarist closed 1 year ago

Andarist commented 1 year ago

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 PR focuses solely on fixing "🐛 Used fallback condition" problem but the "👺 Masquerading as ESM" and "⚠️ ESM (dynamic import only)" remain here. You can check the reported errors here

Andarist commented 1 year ago

@andy128k would there be any chance to get this small fix released?

andy128k commented 1 year ago

Released in 7.1.3