Webpack: silence output

I would like to know if there's a configuration option to tell webpack to only log the "important information" to the terminal. Pretty much just errors and warnings, not all of this:

output of terminal with webpack

There's just so much output! Would love to suppress the common stuff and only have webpack output the warnings/errors. Would like a solution for webpack, webpack-dev-server, and karma-webpack.

Note: I tried noInfo: true and quiet: true but that didn't seem to do the trick.


Edit: I'm thinking this may not be possible, so I've created an issue on github: https://github.com/webpack/webpack/issues/1191


In my webpack config, Doing this reduced my incremental build time by 8 seconds and silenced output. The main one is chunks: false

Play with it to fit your needs

module.exports = {
 devServer: {
  stats: {
    colors: true,
    hash: false,
    version: false,
    timings: false,
    assets: false,
    chunks: false,
    modules: false,
    reasons: false,
    children: false,
    source: false,
    errors: false,
    errorDetails: false,
    warnings: false,
    publicPath: false
  }
 }
}

👋 You don't need all that. All you need is the

Actually, these two work great.

stats: 'errors-only',

at the end of the exported object.

One could also use stats: 'minimal', it only outputs when errors or new compilation happen. Read more from the official documentation of Webpack.


I don't know when this feature was added, but I just noticed in the docs that you can add a webpackMiddleware property and on that you can specify noInfo: true. Doing this removes all the noise! But you still see output when there are errors. Yay!