You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Guide.Mocking.md
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,11 @@ This replacement mechanism provides a lot of flexibility to change implementatio
23
23
24
24
#### Configuration
25
25
0. For RN < 0.55, setup `react-native-repackager` in your library.
26
-
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:
26
+
1. Configure the metro bundler to use the extensions defined by `RN_SRC_EXT`:
27
+
- If you use 0.55 <= RN < 0.59, create a file called `rn-cli.config.js` in the root folder.
28
+
- 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)) the file should be named `metro.config.js` or `metro.config.json` (or define metro field in `package.json`) to root dir.
29
+
30
+
Then set up `resolver.sourceExts` to prioritize any given source extension over the default one:
0 commit comments