diff --git a/local-cli/init/init.js b/local-cli/init/init.js index 30209bc9485..d7497a4a828 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 react-test-renderer@${reactVersion}`; + const jestDeps = `jest babel-jest babel-preset-react-native@^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 new file mode 100644 index 00000000000..a9ce1369e61 --- /dev/null +++ b/local-cli/templates/HelloWorld/_babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["react-native"] +}