bamlab/react-native-graphql-transformer

Metro >= 5.1 removed reactNativeTransformer.js

smeevil opened this issue · 1 comments

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.

Fixed by #8. Thanks!