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
IMHO the detection is fine - it solves more problems than it creates. As mentioned in the other thread - I believe that if pragmas alone would reconfigure the transform then there wont be a problem here. We would eat the cake and have it too 😉
Just waiting for some more thoughts from the team on this, but we could leave the automatic detection on - with a manual "emergency" flag, as we know it may fail in some cases (where there are mixed React versions installed).
Another option may be to move back to the previous logic, and find another way to resolve the Jest issue - maybe an environment variable that we set in test or something like that.
We definitely need an opt-out flag. For detection, if we leave it in — it needs to resolve React from the application folder (and not from react-scripts's own folder). It needs to happen outside the Babel preset because the preset output itself must be deterministic, or caching won't work correctly.
I'm starting to think that automated detection might be a significant footgun. At least when done this way. https://github.com/facebook/create-react-app/pull/9788/files#r506932998
I'm leaning towards this proposal:
This also addresses automatic detection issues in facebook/react#20031 (comment).
The text was updated successfully, but these errors were encountered: