You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks, only package.json solution worked for me.
Edit: This didn't fully work as intended.
After trying a few different things, what worked for me was:
create a new react app project.
Implement @n3tr changes given by his pull request(It's only moving 2 lines of code).
Activity
[-][4.0]ReferenceError: React is not defined[/-][+][v4]ReferenceError: React is not defined[/+]React is not defined
compilation error after ejected #9885n3tr commentedon Oct 24, 2020
I have submitted PR #9885 to fix this.
This is because the jsx-runtime configuration gets removed webpack config during the ejection process.
In the meantime, Adding a runtime option to babel in
package.json
will solve the issueor add presents option back to
webpack.config.js
(around line 409)bradydowling commentedon Nov 6, 2020
Thank you @n3tr! Changing the webpack config as you suggested worked for me.
trozler commentedon Nov 12, 2020
Thanks, only
package.json
solution worked for me.Edit: This didn't fully work as intended.
After trying a few different things, what worked for me was:
I then just copied my source files over.