passthrough-syntax-plugins.js 734 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/**
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @format
 */
"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;