diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-07-20 04:16:50 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-07-20 04:16:50 +0200 |
commit | 1f8c3af5f9143cecaf977f9396c3c8ee7f909735 (patch) | |
tree | bfc93fd8f72c455d19a479e3c0beb8321e9690b4 /gulpfile.js | |
parent | a8bd05298eccf3ac3f89afca4b28856fbb1be82f (diff) |
do not swallow errors
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gulpfile.js b/gulpfile.js index cff034b52..ae3cdee31 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -166,9 +166,14 @@ gulp.task("dist-prod", ["compile-prod"], function () { gulp.task("compile-prod", function (callback) { let config = require("./webpack.config.js")({prod: true}); webpack(config, function(err, stats) { - if(err) { + if (err) { throw new gutil.PluginError("webpack", err); } + if (stats.hasErrors() || stats.hasWarnins) { + gutil.log("[webpack]", stats.toString({ + colors: true, + })); + } callback(); }); }); |