fix: Migrate to babel-plugin-syntax-hermes-parser#822
fix: Migrate to babel-plugin-syntax-hermes-parser#822satya164 merged 3 commits intocallstack:mainfrom
Conversation
|
Thanks for the PR. Looking at the related issue, I'm also a bit confused why they have this issue. We use the custom preset only for library code in Haven't had a chance to try it locally though. |
|
Ah, I guess coz |
|
Looks like React Native includes Which we also need to include to preserve the previous behavior. |
0fd6e57 to
f1102a5
Compare
|
I tested the linked repro huextrat/react-native-rate-app#201 but i can't reproduce the syntax error locally in React Native app. Looking at the PR, seems they are talking about Jest, which is a different issue, and should be fixed by adjusting the babel config at the root to https://github.com/callstack/react-native-builder-bob/blob/a260218a99443cac14106fff76321f32fbde32c7/packages/create-react-native-library/templates/common/babel.config.js cc @huextrat I'll update this PR later to move to the hermes syntax parser and flow strip types transform before merging. |
|
@satya164 Ah yeah, need both. Are you happy to own? |
|
@huntie yeah I'll take care of adding it. |
57ea54d to
d8017e0
Compare
Summary
Fixes compatibility of
react-native-builder-bob/babel-presetwith React Native versions>= 0.76.0— likely broken today, without user config modifications.@babel/preset-flowis discontinued. The Flow language has since evolved (e.g.assyntax) and newerreact-nativeversions can no longer be parsed.Context:
Test plan
Note
TO DO (would also appreciate if a maintainer had time to E2E validate this)