The default webpack CLI output is way too verbose for my liking. As soon as I import React from one of my files, the output explodes, showing all of the chunks (?) being packed:
webpack result is served from / content is served from /Users/me/myproject Hash: aaaf5afc6582f3222f55 Version: webpack 1.12.14 Time: 1175ms Asset Size Chunks Chunk Names index.js 677 kB 0 [emitted] main chunk {0} index.js (main) 643 kB [rendered] [0] ./src/app.js 574 bytes {0} [built] [1 error] [1] ./~/react/react.js 56 bytes {0} [built] [2] ./~/react/lib/React.js 1.49 kB {0} [built] [3] ./~/react/lib/ReactDOM.js 3.71 kB {0} [built] [4] ./~/process/browser.js 2.06 kB {0} [built] ... [155] ./~/fbjs/lib/mapObject.js 1.47 kB {0} [built] [156] ./~/react/lib/onlyChild.js 1.21 kB {0} [built] [157] ./~/react/lib/deprecated.js 1.77 kB {0} [built] [158] ./~/react-dom/index.js 63 bytes {0} [built] [159] ./src/component.js 339 bytes {0} [built] [1 error]
I really don't care about all of that extra information. I'd be happy with a way to either:
At the moment my webpack command is webpack-dev-server --progress
. My webpack config is pretty basic, just specifying entry, output, and loaders for babel and eslint.
splitChunks.If the current chunk contains modules already split out from the main bundle, it will be reused instead of a new one being generated. This can affect the resulting file name of the chunk. webpack.config.js module.
Webpack v4+ will minify your code by default in production mode .
Type: Ctrl+C once.
From the command line, I haven't been able to find a way to do this.
However, if you have a webpack.config.js
file, there are two options for suppressing the list of modules ..
devServer: { stats: 'errors-only' }
or
devServer: { stats: { chunks: false } }
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With