From 15050da1cd3ce6785c957847adcde7c56dbf281b Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac Date: Thu, 15 Dec 2016 00:07:49 +0100 Subject: [PATCH] Let Webpack talk again --- js/webpack/dev.server.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/js/webpack/dev.server.js b/js/webpack/dev.server.js index 9e8bd1524..fc107488a 100644 --- a/js/webpack/dev.server.js +++ b/js/webpack/dev.server.js @@ -15,6 +15,7 @@ // along with Parity. If not, see . const webpack = require('webpack'); +const WebpackStats = require('webpack/lib/Stats'); const webpackDevMiddleware = require('webpack-dev-middleware'); const webpackHotMiddleware = require('webpack-hot-middleware'); @@ -59,12 +60,24 @@ app.use(webpackHotMiddleware(compiler, { })); app.use(webpackDevMiddleware(compiler, { - noInfo: false, - quiet: true, + noInfo: true, + quiet: false, progress: true, publicPath: webpackConfig.output.publicPath, stats: { colors: true + }, + reporter: function (data) { + // @see https://github.com/webpack/webpack/blob/324d309107f00cfc38ec727521563d309339b2ec/lib/Stats.js#L790 + // Accepted values: none, errors-only, minimal, normal, verbose + const options = WebpackStats.presetToOptions('minimal'); + options.timings = true; + + const output = data.stats.toString(options); + + process.stdout.write('\n'); + process.stdout.write(output); + process.stdout.write('\n\n'); } }));