Switch babel preset to metro-react-native-babel-preset (#20653)

Summary:
Fixes #20567
Pull Request resolved: https://github.com/facebook/react-native/pull/20653

Differential Revision: D9296819

Pulled By: hramos

fbshipit-source-id: 88953afb9778e3c8cde5576b068888fd882c2220
This commit is contained in:
Linus Unnebäck 2018-08-13 10:26:58 -07:00 committed by Facebook Github Bot
parent c5cbd0f64a
commit 35bd17f1d6
2 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ function generateProject(destinationRoot, newProjectName, options) {
}); });
} }
if (!options['skip-jest']) { if (!options['skip-jest']) {
const jestDeps = `jest babel-jest babel-preset-react-native@^5 react-test-renderer@${reactVersion}`; const jestDeps = `jest babel-jest metro-react-native-babel-preset@^0.43.5 react-test-renderer@${reactVersion}`;
if (yarnVersion) { if (yarnVersion) {
console.log('Adding Jest...'); console.log('Adding Jest...');
execSync(`yarn add ${jestDeps} --dev --exact`, {stdio: 'inherit'}); execSync(`yarn add ${jestDeps} --dev --exact`, {stdio: 'inherit'});

View File

@ -1,3 +1,3 @@
{ {
"presets": ["react-native"] "presets": ["module:metro-react-native-babel-preset"]
} }