mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
320963c7cb
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46318 Configures the Metro by default to use the Hermes parser so that React Native can fully leverage all modern Flow language syntax. NOTE: This does not affect `*.ts` and `*.tsx` files which will continue to use Babel. Metro has logic to enforce this regardless of the transform options. Changelog: [General][Changed] - Changed Metro default config to use Hermes parser, enabling the use of advanced Flow syntax in React Native. Reviewed By: robhogan Differential Revision: D62161923 fbshipit-source-id: 0f4c069d429517be16abcc6a2187cd23c6bd52d4
@react-native/metro-config
Installation
yarn add --dev @react-native/js-polyfills metro-config @react-native/metro-babel-transformer metro-runtime @react-native/metro-config
Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like
Testing
To run the tests in this package, run the following commands from the React Native root folder:
yarnto install the dependencies. You just need to run this onceyarn jest packages/metro-config.