Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better TypeScript support for package.json exports field (#37377)
Summary: Pull Request resolved: #37377 For 0.72 I enabled `moduleResolution: "nodenext"` which allows some package exports support, but this is imperfect. E.g. RN will typecheck against the `node` condition and there are some more restrictions than we need. D45720238 bumped TypeScript to 5.0 for RN 0.73, along with D45721088 which brought the tsconfig inline. This lets us switch to the new [`moduleResolution: "bundler"`](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#moduleresolution-bundler) and instructs `tsc` to follow the `react-native` export condition. See even more context at: microsoft/TypeScript#51669 Changelog: [General][Added] - Better TypeScript support for package.json exports field Reviewed By: christophpurrer Differential Revision: D45769740 fbshipit-source-id: 1ad450b8157bfd0d539289835bed097fd950cf78
- Loading branch information
1b0e8b1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it right to set
module
toes2015
? From this doc, it seems themodule
has to be eitheresnext
orpreserve
whenmoduleResolution
is set tobundler
.