mathieudutour / create-react-native-app-typescript

Create a React Native app using Typescript on any OS with no build config.
BSD 3-Clause "New" or "Revised" License
252 stars 21 forks source link

fresh app doesn't work after `yarn eject` #12

Closed xe4me closed 6 years ago

xe4me commented 6 years ago

yarn eject breaks the app : .

I followed the steps, exactly as provided in the docs. It was working with expo, but right after I did yarn eject, it throw bellow error

  1. Operating system: Mac OS
  2. Phone/emulator/simulator & version: IphoneX Emulator , Iphone6 Emulator
screen shot 2018-05-04 at 11 06 47 pm
Spetastian commented 6 years ago

I have the same issue. Any updates on this?

phoenecke commented 6 years ago

I needed to create a file rn-cli.config.js as explained here: https://github.com/Microsoft/TypeScript-React-Native-Starter#adding-typescript

module.exports = {
  getTransformModulePath() {
    return require.resolve("react-native-typescript-transformer");
  },
  getSourceExts() {
    return ["ts", "tsx"];
  }
};
mathieudutour commented 6 years ago

ah we should be able to automate that file creation in the eject script if someone wants to create a PR