Files
Tim Yung 320963c7cb RN: Enable Hermes Parser in Default Metro Config (#46318)
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
2024-09-04 11:04:32 -07:00
..

@react-native/metro-config

Version

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:

  1. yarn to install the dependencies. You just need to run this once
  2. yarn jest packages/metro-config.