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

Add exports field to react-dom (including configuring Cloudflare and Deno) #23252

Merged
merged 1 commit into from
Feb 8, 2022

Commits on Feb 8, 2022

  1. Add exports field to react-dom

    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.
    sebmarkbage committed Feb 8, 2022
    Configuration menu
    Copy the full SHA
    f8986bb View commit details
    Browse the repository at this point in the history