mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
metro-config: Revert setting hermesParser: true in default Metro config (#47670)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47670 Now that we have `babel-plugin-syntax-hermes-parser` in `react-native/babel-preset` (since D63535216), it's no longer necessary to use `hermes-parser` directly in Metro in order to use newer Flow syntax. Babel with `babel-plugin-syntax-hermes-parser` is generally preferable, because it intelligently falls back to parsing with Babel for any non-`flow` files. See https://github.com/facebook/hermes/issues/1549 for context. Changelog: [General][Fixed] metro-config: Don't use `hermes-parser` by default, prefer `babel-plugin-syntax-hermes-parser`, which supports other syntax plugins. Reviewed By: huntie Differential Revision: D66002056 fbshipit-source-id: cf48acec347e2c0791872f8ca4b53f5f8af1c783
This commit is contained in:
committed by
Blake Friedman
parent
73f6277175
commit
304179d297
@@ -89,7 +89,6 @@ export function getDefaultConfig(projectRoot: string): ConfigT {
|
||||
babelTransformerPath: require.resolve(
|
||||
'@react-native/metro-babel-transformer',
|
||||
),
|
||||
hermesParser: true,
|
||||
getTransformOptions: async () => ({
|
||||
transform: {
|
||||
experimentalImportSupport: false,
|
||||
|
||||
Reference in New Issue
Block a user