Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/content/configuration/resolve.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,32 @@ importing
- `'foo/bar'` will resolve to `'foo/bar-node.js'` as the `"node"` key comes before `"require"` key in the conditional exports object.
- `'foo/baz'` will resolve to `'foo/baz-node.js'`

If you want to add your custom field names while still retaining the default Webpack values, you can use `"..."`:

**webpack.config.js**

```js
module.exports = {
//...
resolve: {
conditionNames: ['my-custom-condition', '...'],
},
};
```

Alternatively, to prioritize the deault conditions first, then add your custom conditions:

**webpack.config.js**

```js
module.exports = {
//...
resolve: {
conditionNames: ['...', 'my-custom-condition'],
},
};
```

### resolve.descriptionFiles

`[string] = ['package.json']`
Expand Down
Loading