Skip to content

Commit dbdc851

Browse files
committed
chore: update docs
1 parent 386568f commit dbdc851

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

website/src/docs/getting-started/configuration.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ For Expo projects, the `entryPoint` should be set to the path specified in the `
102102
| `coverage` | Coverage configuration object. |
103103
| `coverage.root` | Root directory for coverage instrumentation (default: `process.cwd()`). |
104104
| `forwardClientLogs` | Forward console logs from the app to the terminal (default: `false`). |
105+
| `unstable__enableMetroCache` | Enable Metro transformation cache under `.harness/metro-cache` and log when reusing it (default: `false`). |
105106

106107
## Test Runners
107108

website/src/docs/guides/ci-cd.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,22 @@ jobs:
211211
runner: ios
212212
```
213213
214+
## Metro cache (optional)
215+
216+
React Native Harness can persist Metro's transformation cache under `.harness/metro-cache` in your project root. Enabling it in config (`unstable__enableMetroCache: true`) speeds up repeated Metro runs. In CI, you can cache this directory to avoid re-transforming unchanged files between workflow runs:
217+
218+
```yaml
219+
- name: Metro cache
220+
uses: actions/cache@v4
221+
with:
222+
path: .harness/metro-cache
223+
key: ${{ runner.os }}-metro-cache-${{ hashFiles('**/pnpm-lock.yaml', '**/yarn.lock', '**/package-lock.json', '**/metro.config.js', '**/metro.config.mjs', '**/babel.config.js', '**/babel.config.mjs') }}
224+
restore-keys: |
225+
${{ runner.os }}-metro-cache-
226+
```
227+
228+
Use a key that includes your lockfile and Metro/Babel config paths so the cache invalidates when dependencies or bundler config change.
229+
214230
## Build Artifact Caching
215231

216232
The workflow includes build artifact caching to significantly reduce CI execution times. When native modules haven't changed, you can reuse the same debug builds instead of rebuilding from scratch.

0 commit comments

Comments
 (0)