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:
parent
c5cbd0f64a
commit
35bd17f1d6
|
@ -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'});
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"presets": ["react-native"]
|
"presets": ["module:metro-react-native-babel-preset"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue