diff --git a/lib/compile.js b/lib/compile.js index cdb9b6d61..faa1b9a6c 100644 --- a/lib/compile.js +++ b/lib/compile.js @@ -18,7 +18,12 @@ function ensureArray(obj) { } function getStatsLogger(statsConfig, consoleLog) { - return stats => consoleLog(stats.toString(statsConfig || defaultStatsConfig)); + return stats => { + const statsOutput = stats.toString(statsConfig || defaultStatsConfig); + if (statsOutput) { + consoleLog(statsOutput); + } + }; } function webpackCompile(config, logStats) {