Metro >= 5.1 removed reactNativeTransformer.js
smeevil opened this issue · 1 comments
smeevil commented
Versions >=5.1 of metro have removed reactNativeTransformer.js
and added a new package metro-react-native-babel-transformer
.
updating the index.js to:
if (reactNativeMinorVersion >= 59) {
upstreamTransformer = require('metro-react-native-babel-transformer/src/index')
} else if (reactNativeMinorVersion >= 56) {
upstreamTransformer = require('metro/src/reactNativeTransformer')
} ....
Did work for me, maybe its best to remove the whole version condition block and just add the dependency of metro-react-native-babel-transformer ?
Not sure what the best way might be though :)
Gerard.