From 366d1145438b06a4132111507c55f4eeace89e62 Mon Sep 17 00:00:00 2001 From: Nick Graef Date: Wed, 22 Aug 2018 10:39:11 -0700 Subject: [PATCH] ignore babelrc in git-upgrade (#20790) 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 --- react-native-git-upgrade/cli.js | 1 + 1 file changed, 1 insertion(+) diff --git a/react-native-git-upgrade/cli.js b/react-native-git-upgrade/cli.js index 19103c9fefb9df..d54cf4a26beed6 100644 --- a/react-native-git-upgrade/cli.js +++ b/react-native-git-upgrade/cli.js @@ -10,6 +10,7 @@ 'use strict'; require('babel-register')({ + babelrc: false, presets: [ require('babel-preset-es2015-node'), require('babel-preset-stage-3'),