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

move types condition to the front #2469

Merged
merged 2 commits into from May 1, 2023

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented May 1, 2023

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 for @headlessui/react, @headlessui/tailwindcss and @headlessui/vue

@vercel
Copy link

vercel bot commented May 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2023 4:14pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2023 4:14pm

@thecrypticace
Copy link
Contributor

Thanks @Andarist!

@thecrypticace
Copy link
Contributor

This will go out in the next tagged release but it'll be available in our insiders build in a few minutes as well:

npm install @headlessui/react@insiders
npm install @headlessui/vue@insiders

@Andarist
Copy link
Contributor Author

Andarist commented Jun 1, 2023

@thecrypticace do you have any plans for a new release? I just wonder what's a rough ETA for this fix to get published

@RobinMalfait
Copy link
Collaborator

@Andarist I just got a release out, so you should be able to install the latest version:

  • npm install @headlessui/react@latest.
  • npm install @headlessui/vue@latest.

@Andarist
Copy link
Contributor Author

Andarist commented Jun 1, 2023

Thank you ❤️

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.

None yet

3 participants