Skip to content

Commit

Permalink
fix(Server): cascade stats options
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannmoinet committed Feb 14, 2019
1 parent f78a9a3 commit cb53ba7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class Server {
throw new Error("'filename' option must be set in lazy mode.");
}

this.stats = Object.assign({}, STATS, options.stats);
this.hot = options.hot || options.hotOnly;
this.headers = options.headers;
this.progress = options.progress;
Expand Down Expand Up @@ -144,7 +145,7 @@ class Server {
compile.tap('webpack-dev-server', invalidPlugin);
invalid.tap('webpack-dev-server', invalidPlugin);
done.tap('webpack-dev-server', (stats) => {
this._sendStats(this.sockets, stats.toJson(STATS));
this._sendStats(this.sockets, stats.toJson(this.stats));
this._stats = stats;
});
};
Expand Down Expand Up @@ -817,7 +818,7 @@ class Server {
return;
}

this._sendStats([connection], this._stats.toJson(STATS), true);
this._sendStats([connection], this._stats.toJson(this.stats), true);
});

socket.installHandlers(this.listeningApp, {
Expand Down

0 comments on commit cb53ba7

Please sign in to comment.