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 flight specific entry point for react package #20304

Merged
merged 1 commit into from
Nov 20, 2020

Commits on Nov 20, 2020

  1. Add flight specific entry point for react package

    This configures the Flight fixture to use the "react-server" environment.
    
    This allows the package.json exports field to specify a different resolution
    in this environment.
    
    I use this in the "react" package to resolve to a new bundle that excludes
    the Hooks that aren't relevant in this environment like useState and useEffect.
    
    This allows us to error early if these names are imported. If we actually
    published ESM, it would we a static error. Now it's a runtime error.
    
    You can test this by importing useState in Container.js which is used
    by the client and server.
    sebmarkbage committed Nov 20, 2020
    Configuration menu
    Copy the full SHA
    5413001 View commit details
    Browse the repository at this point in the history