From 9b18b5b1cfff36028e82e6bbdc0348f6ca8efa06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Mon, 13 Aug 2018 10:26:58 -0700 Subject: [PATCH] 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 --- local-cli/init/init.js | 2 +- local-cli/templates/HelloWorld/_babelrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/local-cli/init/init.js b/local-cli/init/init.js index d7497a4a828476..54324c152ab14d 100644 --- a/local-cli/init/init.js +++ b/local-cli/init/init.js @@ -99,7 +99,7 @@ function generateProject(destinationRoot, newProjectName, options) { }); } 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) { console.log('Adding Jest...'); execSync(`yarn add ${jestDeps} --dev --exact`, {stdio: 'inherit'}); diff --git a/local-cli/templates/HelloWorld/_babelrc b/local-cli/templates/HelloWorld/_babelrc index a9ce1369e617e9..d4b74b5be7b43d 100644 --- a/local-cli/templates/HelloWorld/_babelrc +++ b/local-cli/templates/HelloWorld/_babelrc @@ -1,3 +1,3 @@ { - "presets": ["react-native"] + "presets": ["module:metro-react-native-babel-preset"] }