Skip to content

Commit

Permalink
docs(config) optimization moduleIds (#2533)
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneHlushko authored and montogeek committed Sep 24, 2018
1 parent 83fb9b2 commit 9a82757
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/content/configuration/optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,33 @@ module.exports = {
};
```

## `optimization.moduleIds`

`bool: false` `string: natural, named, hashed, size, total-size`

Tells webpack which algorithm to use when choosing module ids. Setting `optimization.moduleIds` to `false` tells webpack that none of built-in algorithms should be used, as custom one can be provided via plugin.

The following string values are supported:

Option | Description
--------------------- | -----------------------
`natural` | Numeric ids in order of usage.
`named` | Readable ids for better debugging.
`hashed` | short hashes as ids for better long term caching.
`size` | Numeric ids focused on minimal initial download size.
`total-size` | numeric ids focused on minimal total download size.

__webpack.config.js__

```js
module.exports = {
//...
optimization: {
moduleIds: 'hashed'
}
};
```

## `optimization.nodeEnv`

`string` `bool: false`
Expand Down

0 comments on commit 9a82757

Please sign in to comment.