Skip to content

Commit cb53ba7

Browse files
committed
fix(Server): cascade stats options
1 parent f78a9a3 commit cb53ba7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/Server.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ class Server {
9191
throw new Error("'filename' option must be set in lazy mode.");
9292
}
9393

94+
this.stats = Object.assign({}, STATS, options.stats);
9495
this.hot = options.hot || options.hotOnly;
9596
this.headers = options.headers;
9697
this.progress = options.progress;
@@ -144,7 +145,7 @@ class Server {
144145
compile.tap('webpack-dev-server', invalidPlugin);
145146
invalid.tap('webpack-dev-server', invalidPlugin);
146147
done.tap('webpack-dev-server', (stats) => {
147-
this._sendStats(this.sockets, stats.toJson(STATS));
148+
this._sendStats(this.sockets, stats.toJson(this.stats));
148149
this._stats = stats;
149150
});
150151
};
@@ -817,7 +818,7 @@ class Server {
817818
return;
818819
}
819820

820-
this._sendStats([connection], this._stats.toJson(STATS), true);
821+
this._sendStats([connection], this._stats.toJson(this.stats), true);
821822
});
822823

823824
socket.installHandlers(this.listeningApp, {

0 commit comments

Comments
 (0)