-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: Add jsx-runtime
exports field to @emotion/react
#2785
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 23c80ed:
|
1712c00
to
97db39e
Compare
This was being worked on here but we didn't have time lately to finish the job there. |
@Andarist yeah, I see, there is some big update accumulating. I wish would could just fix the |
I tested this out here. The CommonJS: works! ESM:
Which is weird because the Also a few questions for you:
|
Is there a workaround for this? |
@hanson-so For now, just use |
This change is also included in #2819 which uses latest version of precontruct to automatically generate the exports conditions. |
Add
exports
field to@emotion/react
in order to fixCannot find module 'react/jsx-runtime'
when TypeScript is pre-configured withmoduleResolution: "NodeNext"
introduced in TypeScriptv4.7
.Ref #2742, microsoft/TypeScript#33079
https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#package-json-exports-imports-and-self-referencing
https://nodejs.org/api/packages.html#conditional-exports