Skip to content

Commit 9504cf6

Browse files
committed
[output] Add a minimal output option for the middleware
1 parent 5136829 commit 9504cf6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

middleware.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ module.exports = function(compiler, options) {
2727
// check if still in valid state
2828
if(!state) return;
2929
// print webpack output
30-
var displayStats = !options.quiet;
30+
var displayStats = (!options.quiet && !options.minimalOutput);
3131
if(displayStats &&
3232
!(stats.hasErrors() || stats.hasWarnings()) &&
3333
options.noInfo)
3434
displayStats = false;
3535
if(displayStats) {
3636
console.log(stats.toString(options.stats));
3737
}
38-
if(!options.noInfo && !options.quiet)
38+
if ((!options.noInfo && !options.quiet) || options.minimalOutput)
3939
console.info("webpack: bundle is now VALID.");
4040

4141
// execute callback that are delayed
@@ -55,8 +55,8 @@ module.exports = function(compiler, options) {
5555

5656
// on compiling
5757
function invalidPlugin() {
58-
if(state && (!options.noInfo && !options.quiet))
59-
console.info("webpack: bundle is now invalid.");
58+
if(state && ((!options.noInfo && !options.quiet) || options.minimalOutput))
59+
console.info("webpack: bundle is now INVALID.");
6060
// We are now in invalid state
6161
state = false;
6262
}

0 commit comments

Comments
 (0)