Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
@babel/plugin-proposal-numeric-separator
to the babel plugins w…
…hen not in Hermes (#681) Summary: Changelog: * **[Feature]**: Enable ES2021 numeric separator syntax in React Native **Summary** This PR solves issue #645. It adds `babel/plugin-proposal-numeric-separator` to the list of babel plugins when not using Hermes to more closely match ES2021. Now that ES2021 has been finalized, people will probably (?—I know I did) expect `1_000_000` to be treated as a valid number. As I noted in a [comment](#645 (comment)) in #645, should `babel/preset-env` be included instead of including many different plugins manually? Even for engines like Hermes which don't need all the same transforms as JSC, I don't think the unneeded transforms would drastically increase the bundle size, right? **Test plan** Tested it using a sample app on `"react-native": "0.65.0-rc.2"`. Solves the `react-native bundle` issue on iOS (only tested on device as I encountered issues compiling for the simulator) and Android production / release builds when not using Hermes. Pull Request resolved: #681 Reviewed By: rubennorte Differential Revision: D29556107 Pulled By: motiz88 fbshipit-source-id: 2d66bf8993cb10dd1f020939f4ad1bbf49cccc19
- Loading branch information