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
29 changes: 28 additions & 1 deletion src/content/configuration/resolve.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,34 @@ The following table explains other cases:

W> `resolve.alias` takes precedence over other module resolutions.

W> [`null-loader`](https://github.com/webpack-contrib/null-loader) will be deprecated in `webpack@5`. use `alias: { xyz$: false }` or absolute path `alias: {[path.resolve(__dirname, "....")]: false }`
W> [`null-loader`](https://github.com/webpack-contrib/null-loader) is deprecated in webpack 5. use `alias: { xyz$: false }` or absolute path `alias: {[path.resolve(__dirname, './path/to/module')]: false }`

W> `[string]` values are supported since webpack 5.

```js
module.exports = {
//...
resolve: {
alias: {
_: [path.resolve(__dirname, 'src/utilities/'), path.resolve(__dirname, 'src/templates/')]
}
}
};
```

Setting `resolve.alias` to `false` will tell webpack to ignore a module.

```js
module.exports = {
//...
resolve: {
alias: {
'ignored-module': false,
'./ignored-module': false,
}
}
};
```

### `resolve.aliasFields`

Expand Down