Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add exports field to react-dom (#23252)
This configures the exports field for react-dom. Notably there are some conditions for the /server entry point where we pick the export based on environments. Most environments now support Web Streams which is preferred in those environments. We already do this using the "browser" field so the "browser" condition applies here too. I don't think it's necessary, but I also specified "worker" explicitly since this is for Service Workers and those are often targeted with Web Pack's "webworker" target, which is also what Cloudflare currently recommends. I also added "deno" but deno is a bit special because this only works if you run with the node compatibility since otherwise you have to specify absolute URLs for the imports.
- Loading branch information