Skip to content

fix: React is not defined compilation error after ejected - #9885

Merged
ianschmitz merged 1 commit into
react:masterfrom
n3tr:fix-ejected-react-not-defined
Oct 26, 2020
Merged

fix: React is not defined compilation error after ejected#9885
ianschmitz merged 1 commit into
react:masterfrom
n3tr:fix-ejected-react-not-defined

Conversation

@n3tr

@n3trn3tr commented Oct 24, 2020

Copy link
Copy Markdown
Contributor

fix#9882

Eject the app will cause React is not defined, This is due to the Babel's configuration for JSX runtime gets removed during ejecting.

Change

  • Keep runtime configuration on ejection

Verify Steps

  • yarn create-react-app test-ejecting-app
  • cd test-eject-app
  • yarn eject
  • yarn start and app should gets compiled successfully

@ehsankhfr

Copy link
Copy Markdown
Contributor

@n3tr Seems the change is already done by another PR and is merged.

@ianschmitzianschmitz changed the title [v4] Fix React is not defined compilation error after ejectedfix: React is not defined compilation error after ejectedOct 26, 2020
@ianschmitzianschmitz added this to the 4.0.1 milestone Oct 26, 2020
@ianschmitz
ianschmitz merged commit 027b03b into react:masterOct 26, 2020
@ianschmitz

Copy link
Copy Markdown
Contributor

Thanks for the fixes @n3tr!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v4]ReferenceError: React is not defined

4 participants

@n3tr@ehsankhfr@ianschmitz@facebook-github-bot