Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove deprecated wildcard folder mapping
Node v16 deprecated the use of trailing "/" to define subpath folder mappings in the "exports" field of package.json. We could switch this to "/*" instead. However, the recommendation is to explicitly list the public paths you want to export. So instead, we can remove the wildcard export. The only reason we added it in the first place was because of an implementation detail of the custom Rollup plugin that we use to resolve forked internal modules at build time. The plugin relied on require.resolve, which doesn't work with ESM modules. I fixed this by removing the require.resolve call in facebook#23255. The only two affected packages are react-dom and react. We need to be sure that all our public modules are still reachable. I audited the exports by comparing the entries to the "files" field in package.json, which represents a complete list of the files that are included in the final release artifact. At some point, we should add an e2e packaging test to prevent regressions; for now, we should have decent coverage because in CI we run our Jest test suite against the release artifacts.
- Loading branch information