Skip to content

Commit 68ac9ac

Browse files
committed
[output] Implement removing the stats from output by using a stats: false value
1 parent 9504cf6 commit 68ac9ac

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
@@ -10,7 +10,7 @@ var mime = require("mime");
1010
module.exports = function(compiler, options) {
1111
if(!options) options = {};
1212
if(options.watchDelay === undefined) options.watchDelay = 200;
13-
if(!options.stats) options.stats = {};
13+
if(typeof options.stats === "undefined") options.stats = {};
1414
if(!options.stats.context) options.stats.context = process.cwd();
1515

1616
// store our files in memory
@@ -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 && !options.minimalOutput);
30+
var displayStats = (!options.quiet && options.stats !== false);
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) || options.minimalOutput)
38+
if (!options.noInfo && !options.quiet)
3939
console.info("webpack: bundle is now VALID.");
4040

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

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

0 commit comments

Comments
 (0)