Skip to content

Commit

Permalink
Corrects React Native version specifier in Mocking (wix#1650)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderwallin authored and LeoNatan committed Oct 1, 2019
1 parent ffde603 commit 2c15844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/Guide.Mocking.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This replacement mechanism provides a lot of flexibility to change implementatio

#### Configuration
0. For RN < 0.55, setup `react-native-repackager` in your library.
1. For case 0.55 <= RN < 0.59 create a file called `rn-cli.config.js` in the root folder. If you use RN > 0.59 (which in turn uses Metro with breaking changes introduced in 0.43 - https://github.com/facebook/metro/releases/tag/v0.43.0) file should have name `metro.config.js` or `metro.config.json` (or define metro field in `package.json`) to root dir. Then set up `resolver.sourceExts` to prioritize any given source extension over the default one:
1. For case 0.55 <= RN < 0.59 create a file called `rn-cli.config.js` in the root folder. If you use RN >= 0.59 (which in turn uses Metro with breaking changes introduced in 0.43 - https://github.com/facebook/metro/releases/tag/v0.43.0) file should have name `metro.config.js` or `metro.config.json` (or define metro field in `package.json`) to root dir. Then set up `resolver.sourceExts` to prioritize any given source extension over the default one:

```js
const defaultSourceExts = require('metro-config/src/defaults/defaults').sourceExts
Expand Down

0 comments on commit 2c15844

Please sign in to comment.