Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix using new jsx transform in tests (#501)
The new jsx transform is not working in tests when run through react-app-rewired (the fail with "ReferenceError: React is not defined"). Ported over this change from create-react-app: facebook/create-react-app@2b1161b
- Loading branch information
2ca3055
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a breaking change for folks stuck on babel 6. Can this be moved to a major version?
@timarney @msbarry
2ca3055
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DallasCarraher what about this is breaking? @dawnmist tested the pull request against v3: #501 (comment)
2ca3055
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
react-scripts 3 uses babel 7...in fact, I think react-scripts 2 used babel 7 as well.
@DallasCarraher What version of react-scripts are you using?
2ca3055
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sorry I didn't quite do my homework here and didn't do a great job explaining our scenario.
We have a forked version of CRA from 2018 in many projects at my company. We did this I believe to override the webpack config and get .less files working with a loader.
We've been breaking away from this fork recently and upgrading projects to the latest CRA. Some projects are still lagging behind and are dependencies of projects that have successfully upgraded.
So in a nutshell:
• We have a project using CRA 3.4.4.
• A dependency package using forked CRA 2.x (with babel 6)
• This commit seems to break packages using babel 6.
Long story short, for the time being I just wanted to see if we can make it possible to still get some updates from rewire while we're getting rid of this fork in other projects and also replacing less with sass because eventually we'd even like to get off rewire unless necessary.