mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: X-link: https://github.com/facebook/metro/pull/1024 Pull Request resolved: https://github.com/facebook/react-native/pull/38228 Changelog: [General][Changed] - Move react-native-babel-transformer and react-native-babel-preset from Metro to React Native repo. Metro Changelog: **[Breaking]** - Remove `metro-react-native-babel-transformer` and `metro-react-native-babel-preset`, to be published as `react-native/metro-babel-transformer` and `react-native/babel-preset` instead. This diff does the following: - Move `metro/packages/metro-react-native-babel-preset` to `react-native/packages/react-native-babel-preset`. - Rename `metro-react-native-babel-preset` package to `react-native/babel-preset`. - Move `metro/packages/metro-react-native-babel-transformer` to `react-native/packages/react-native-babel-transformer`. - Rename `metro-react-native-babel-transformer` package to `react-native/metro-babel-transformer`. - Upadate dependencies. Reviewed By: robhogan Differential Revision: D46977466 fbshipit-source-id: 32478f63a0442b61a1804f12ef814c8b29d7f8bb
24 lines
763 B
JavaScript
24 lines
763 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @oncall react_native
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
// This list of syntax plugins is used for two purposes:
|
|
// 1. Enabling experimental syntax features in the INPUT to the Metro Babel
|
|
// transformer, regardless of whether we actually transform them.
|
|
// 2. Enabling these same features in parser passes that consume the OUTPUT of
|
|
// the Metro Babel transformer.
|
|
const passthroughSyntaxPlugins = [
|
|
[require('@babel/plugin-syntax-nullish-coalescing-operator')],
|
|
[require('@babel/plugin-syntax-optional-chaining')],
|
|
];
|
|
|
|
module.exports = passthroughSyntaxPlugins;
|