Merge pull request #3848 from ethcore/ng-webpack-talkative

Let Webpack talk again
This commit is contained in:
Gav Wood 2016-12-15 13:09:06 +01:00 committed by GitHub
commit 0562d85a0e

View File

@ -15,6 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>. // along with Parity. If not, see <http://www.gnu.org/licenses/>.
const webpack = require('webpack'); const webpack = require('webpack');
const WebpackStats = require('webpack/lib/Stats');
const webpackDevMiddleware = require('webpack-dev-middleware'); const webpackDevMiddleware = require('webpack-dev-middleware');
const webpackHotMiddleware = require('webpack-hot-middleware'); const webpackHotMiddleware = require('webpack-hot-middleware');
@ -59,12 +60,24 @@ app.use(webpackHotMiddleware(compiler, {
})); }));
app.use(webpackDevMiddleware(compiler, { app.use(webpackDevMiddleware(compiler, {
noInfo: false, noInfo: true,
quiet: true, quiet: false,
progress: true, progress: true,
publicPath: webpackConfig.output.publicPath, publicPath: webpackConfig.output.publicPath,
stats: { stats: {
colors: true 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');
} }
})); }));