We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ba7668 commit ff1026fCopy full SHA for ff1026f
lib/reporter.js
@@ -5,14 +5,16 @@ module.exports = function reporter(middlewareOptions, options) {
5
6
if (state) {
7
const displayStats = middlewareOptions.stats !== false;
8
+ const statsString = stats.toString(middlewareOptions.stats);
9
- if (displayStats) {
10
+ // displayStats only logged
11
+ if (displayStats && statsString.trim().length) {
12
if (stats.hasErrors()) {
- log.error(stats.toString(middlewareOptions.stats));
13
+ log.error(statsString);
14
} else if (stats.hasWarnings()) {
- log.warn(stats.toString(middlewareOptions.stats));
15
+ log.warn(statsString);
16
} else {
- log.info(stats.toString(middlewareOptions.stats));
17
+ log.info(statsString);
18
}
19
20
0 commit comments