Skip to content

Commit

Permalink
ignore babelrc in git-upgrade (#20790)
Browse files Browse the repository at this point in the history
Summary:
Per [this comment on the issue](#20710 (comment)):

> 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: #20790

Differential Revision: D9458502

Pulled By: hramos

fbshipit-source-id: 3a0ed7261322fdd9e0c0840f8a3944974f38b233
  • Loading branch information
ngraef authored and hramos committed Aug 22, 2018
1 parent b444493 commit e4f4c31
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions react-native-git-upgrade/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'use strict';

require('babel-register')({
babelrc: false,
presets: [
require('babel-preset-es2015-node'),
require('babel-preset-stage-3'),
Expand Down

0 comments on commit e4f4c31

Please sign in to comment.