mirror of
https://github.com/status-im/react-native.git
synced 2025-01-12 18:44:25 +00:00
b4a8630ea5
Summary: Per [this comment on the issue](https://github.com/facebook/react-native/issues/20710#issuecomment-414631827): > Babel by default tries to find .babelrc files to configure itself, and once it finds the one from the RN app (which links to the RN preset that only works on Babel 7) it fails. > The easiest patch to fix this issue is to add babelrc: false to the babel-register method, so Babel does not read any additional .babelrc file. Fixes #20710 Pull Request resolved: https://github.com/facebook/react-native/pull/20790 Differential Revision: D9458502 Pulled By: hramos fbshipit-source-id: 3a0ed7261322fdd9e0c0840f8a3944974f38b233
25 lines
618 B
JavaScript
25 lines
618 B
JavaScript
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* 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';
|
|
|
|
require('babel-register')({
|
|
babelrc: false,
|
|
presets: [
|
|
require('babel-preset-es2015-node'),
|
|
require('babel-preset-stage-3'),
|
|
],
|
|
// Enable transpiling for react-native-git-upgrade AND the generator, just like the upgrade CLI command does
|
|
only: /(react-native-git-upgrade\/(?!(node_modules)))|(local-cli\/generator)/,
|
|
});
|
|
|
|
var cliEntry = require('./cliEntry');
|
|
|
|
module.exports = cliEntry;
|