Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
younggglcy committed Mar 17, 2024
1 parent 5af9d8f commit acb8db1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/node-resolve/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,19 @@ Specifies the properties to scan within a `package.json`, used to determine the

### `preferBuiltins`

Type: `Boolean`<br>
Type: `Boolean | (module: string) => boolean`<br>
Default: `true` (with warnings if a builtin module is used over a local version. Set to `true` to disable warning.)

If `true`, the plugin will prefer built-in modules (e.g. `fs`, `path`). If `false`, the plugin will look for locally installed modules of the same name.

Alternatively, you may pass in a function that returns a boolean to confirm whether the plugin should prefer built-in modules. e.g.

```js
preferBuiltins: (module) => module !== 'punycode';
```

will not treat `punycode` as a built-in module

### `modulesOnly`

Type: `Boolean`<br>
Expand Down

0 comments on commit acb8db1

Please sign in to comment.