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 facebook-github-bot committed Aug 22, 2018
1 parent 8a21abc commit b4a8630
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions react-native-git-upgrade/cli.js
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

1 comment on commit b4a8630

@clarsen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I can confirm this works to upgrade from RN 0.57.3 to 0.57.8. I had to hot patch the react-native-git-upgrade node_module installation.

Please sign in to comment.