Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add types condition to the front #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Andarist
Copy link

@Andarist Andarist commented May 1, 2023

I added 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 CJS" remains here. You can check the reported errors here

@Andarist
Copy link
Author

Andarist commented Jun 1, 2023

@DirtyHairy friendly 🏓

@DirtyHairy
Copy link
Owner

Hi @Andarist !

Sorry for the late reply. Thanks for the PR, I'll see that I review and merge it later this week (the change is trivial and reasonable, but I want to make sure that I understand the underlying issue before merging).

@bacloud22
Copy link

any follow up ?
Type definitions seem not to work with Webstorm IDE.

kindly

@vanGalilea
Copy link

Can we bump this up? As I'm experiencing the same issues on Webstorm IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants