From 0f22307f3eb814187bb5f3d5a64072ba41492e66 Mon Sep 17 00:00:00 2001 From: Manuel Alabor Date: Wed, 13 Mar 2019 09:41:14 +0100 Subject: [PATCH] Update Readme for react-native@0.59 Adds proposed fix for #90 to the setup manual. --- README.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8abc0b6..d9f8fe6 100644 --- a/README.md +++ b/README.md @@ -55,20 +55,34 @@ See [tsconfig.json Notes](#tsconfigjson-notes) for more advanced configuration d ### Step 3: Configure the react native packager -Add this to your rn-cli.config.js (make one if you don't have one already): +#### RN >= 0.59 + +In your projects root, extend `metro.config.js` so it contains the `transformer.babelTransformerPath` property: -#### RN >= 0.57 ```js module.exports = { transformer: { babelTransformerPath: require.resolve('react-native-typescript-transformer') } -} +}; ``` -or +#### RN >= 0.57, < 0.59 + +Add this to your `rn-cli.config.js` (make one if you don't have one already): + +```js +module.exports = { + transformer: { + babelTransformerPath: require.resolve('react-native-typescript-transformer') + } +} +``` #### RN < 0.57 + +Add this to your `rn-cli.config.js` (make one if you don't have one already): + ```js module.exports = { getTransformModulePath() {