Skip to content

Commit

Permalink
docs(node-resolve): update dedupe docs
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsDenBakker committed Jan 4, 2020
1 parent 9b5ff3e commit 244359e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/node-resolve/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,21 @@ Default: `[]`
Force resolving for these modules to root's node_modules that helps to prevent bundling the same package multiple times if package is imported from dependencies.

```
dedupe: [ 'react', 'react-dom' ]
dedupe: [ 'my-package', '@namespace/my-package' ]
```

This will deduplicate bare imports such as:

```js
import 'my-package';
import '@namespace/my-package';
```

And it will deduplicate deep imports such as:

```js
import 'my-package/foo.js';
import '@namespace/my-package/bar.js';
```

### `customResolveOptions`
Expand Down

0 comments on commit 244359e

Please sign in to comment.