Skip to content

Commit 8a73a21

Browse files
EugeneHlushkomontogeek
authored andcommitted
docs(config) Add info about stats pre defined template extension (#2618)
1 parent 50a6620 commit 8a73a21

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/content/configuration/stats.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,27 @@ module.exports = {
180180
}
181181
```
182182

183+
If you want to use one of the pre-defined behaviours e.g. `'minimal'` but still override one or more of the rules, see [the source code](https://github.com/webpack/webpack/blob/master/lib/Stats.js#L1394-L1401). You would want to copy the configuration options from `case 'minimal': ...` and add your additional rules while providing an object to `stats`.
184+
185+
__webpack.config.js__
186+
187+
```javascript
188+
module.exports = {
189+
//..
190+
stats: {
191+
// copied from `'minimal'`
192+
all: false,
193+
modules: true,
194+
maxModules: 0,
195+
errors: true,
196+
warnings: true,
197+
// our additional options
198+
moduleTrace: true,
199+
errorDetails: true
200+
}
201+
};
202+
```
203+
183204
### Sorting fields
184205

185206
For `assetsSort`, `chunksSort` and `moduleSort` there are several possible fields that you can sort items by:

0 commit comments

Comments
 (0)