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

Support types field of conditional exports #290

Merged
merged 1 commit into from
Feb 19, 2023

Conversation

odanado
Copy link
Contributor

@odanado odanado commented Feb 19, 2023

Thank you great library!

--moduleResolution node16 or --moduleResolution nodenext with tsc will resolve the types field of the exports field of the npm package.

"types" - can be used by typing systems to resolve the typing file for the given export. This condition should always be included first.
https://nodejs.org/api/packages.html#community-conditions-definitions

If the types field is not specified, import "jsx-slack" will result in a type error.

reproduced repository
https://github.com/odan-sandbox/jsx-slack-node-esm-sandbox

Copy link
Owner

@yhatt yhatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍

@yhatt yhatt merged commit 369f2e4 into yhatt:main Feb 19, 2023
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.

2 participants