Skip to content

Commit b93b153

Browse files
authored
Cleanup
1 parent 85675aa commit b93b153

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

website/versioned_docs/version-30.0/Configuration.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,15 +1529,14 @@ const config: Config = {
15291529
export default config;
15301530
```
15311531

1532-
Based on the fact that `jest-resolve` uses `unrs-resolver` and passes additional options to it, we can modify the configuration of `mainFields`. For example, for React Native projects, you might use this config:
1532+
Jest's `jest-resolve` relies on `unrs-resolver`. We can pass additional options, for example modifying `mainFields` for resolution. For example, for React Native projects, you might want to use this config:
15331533

15341534
```js
15351535
module.exports = (path, options) => {
15361536
// Call the defaultResolver, so we leverage its cache, error handling, etc.
15371537
return options.defaultResolver(path, {
15381538
...options,
1539-
// This is option from unrs-resolver from https://github.com/unrs/unrs-resolver?tab=readme-ov-file#main-field
1540-
// We use the fact that jest-resolve just passes extra options to unrs-resolver
1539+
// See this `unrs-resolver` option: from https://github.com/unrs/unrs-resolver?tab=readme-ov-file#main-field
15411540
mainFields: ['react-native', 'main'],
15421541
});
15431542
};

0 commit comments

Comments
 (0)