ds300 / react-native-typescript-transformer

Seamlessly use TypeScript with React Native
MIT License
657 stars 55 forks source link

Doesn't work with RN 0.59 #90

Open EugenePisotsky opened 5 years ago

EugenePisotsky commented 5 years ago

Hello,

After upgrading to 0.59.0-rc.1 it stopped working:

Loading dependency graph...error Cannot read property 'transformFile' of undefined

I suppose it's related to metro version (https://github.com/facebook/metro/issues/111#issuecomment-456457949)

ATShiTou commented 5 years ago

I have issues with RN0.59 , too. It does not work at all.

swissmanu commented 5 years ago

so far, we had to add react-native-typescript-transformer through the rn-cli.config.js file. this does not work anymore.

we can achieve the known behavior by putting the configuration into the new metro.config.js file instead:

module.exports = {
  transformer: {
    // ... other configuration by react-native app template
    babelTransformerPath: require.resolve('react-native-typescript-transformer') // 💁‍♂️ Add this line
  }
};

this worked for me with react-native@0.59.