Skip to content

Commit

Permalink
docs(optimization) Document namedModules and namedChunks (#2271)
Browse files Browse the repository at this point in the history
* docs(config) Document optimization namedModules and namedChunks options

* docs(config) add noEmitOnErrors example config to docs
  • Loading branch information
EugeneHlushko authored and montogeek committed Jun 15, 2018
1 parent 27b3552 commit 1bc333a
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion src/content/configuration/optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ Use the `optimization.noEmitOnErrors` to skip the emitting phase whenever there

__webpack.config.js__


```js
module.exports = {
//...
Expand All @@ -114,6 +113,40 @@ module.exports = {

W> If you are using webpack [CLI](/api/cli/), the webpack process will not exit with an error code while this plugin is enabled. If you want webpack to "fail" when using the CLI, please check out the [`bail` option](/api/cli/#advanced-options).

## `optimization.namedModules`

`boolean: false`

Tells webpack to use readable module identifiers for better debugging. When `optimization.namedModules` is not set in webpack config, webpack will enable it by default for [mode](/concepts/mode/) `development` and disable for [mode](/concepts/mode/) `production`.

__webpack.config.js__

```js
module.exports = {
//...
optimization: {
namedModules: true
}
};
```

## `optimization.namedChunks`

`boolean: false`

Tells webpack to use readable chunk identifiers for better debugging. This option is enabled by default for [mode](/concepts/mode/) `development` and disabled for [mode](/concepts/mode/) `production` if no option is provided in webpack config.

__webpack.config.js__

```js
module.exports = {
//...
optimization: {
namedChunks: true
}
};
```

## `optimization.nodeEnv`

`string` `bool: false`
Expand Down

0 comments on commit 1bc333a

Please sign in to comment.