Closed dlmiles closed 6 years ago
https://github.com/webpack/webpack-dev-server/blob/3d3d912a69aadc8c5f0c92119dd25100338acd8f/client-src/default/index.js#L219 This looks the wrong format.
The correct format maybe: self.postMessage({type:'webpackHotUpdate',hash:currentHash}, '*'); This copies the sendMsg() function way of doing it. This can be seen here: https://github.com/webpack/webpack-dev-server/blob/3d3d912a69aadc8c5f0c92119dd25100338acd8f/client-src/default/index.js#L67-L70
self.postMessage({type:'webpackHotUpdate',hash:currentHash}, '*');
... ALSO ...
https://github.com/webpack/webpack-dev-server/blob/3d3d912a69aadc8c5f0c92119dd25100338acd8f/lib/Server.js#L673 stats.hash is always undefined for me
stats.hash
I change at https://github.com/webpack/webpack-dev-server/blob/3d3d912a69aadc8c5f0c92119dd25100338acd8f/lib/Server.js#L74 this._sendStats(this.sockets, this._buildStats(stats, clientStats));
this._sendStats(this.sockets, this._buildStats(stats, clientStats));
I change at https://github.com/webpack/webpack-dev-server/blob/3d3d912a69aadc8c5f0c92119dd25100338acd8f/lib/Server.js#L610 this._sendStats([conn], this._buildStats(this._stats, clientStats), true);
this._sendStats([conn], this._buildStats(this._stats, clientStats), true);
I add new method at https://github.com/webpack/webpack-dev-server/blob/3d3d912a69aadc8c5f0c92119dd25100338acd8f/lib/Server.js#L676
Server.prototype._buildStats = function(stats, clientStats) { var o = stats.toJson(clientStats); if(stats.hash) o.hash = stats.hash; return o; };
... I THINK THE 2 THINGS TOGETHER STOP "[HMR] Updated modules: ..." from working
"webpack": "^4.5.0", "webpack-dev-server": "^3.1.2"
This was fixed in v3.1.3.
https://github.com/webpack/webpack-dev-server/blob/3d3d912a69aadc8c5f0c92119dd25100338acd8f/client-src/default/index.js#L219 This looks the wrong format.
The correct format maybe:
self.postMessage({type:'webpackHotUpdate',hash:currentHash}, '*');
This copies the sendMsg() function way of doing it. This can be seen here: https://github.com/webpack/webpack-dev-server/blob/3d3d912a69aadc8c5f0c92119dd25100338acd8f/client-src/default/index.js#L67-L70... ALSO ...
https://github.com/webpack/webpack-dev-server/blob/3d3d912a69aadc8c5f0c92119dd25100338acd8f/lib/Server.js#L673
stats.hash
is always undefined for meI change at https://github.com/webpack/webpack-dev-server/blob/3d3d912a69aadc8c5f0c92119dd25100338acd8f/lib/Server.js#L74
this._sendStats(this.sockets, this._buildStats(stats, clientStats));
I change at https://github.com/webpack/webpack-dev-server/blob/3d3d912a69aadc8c5f0c92119dd25100338acd8f/lib/Server.js#L610
this._sendStats([conn], this._buildStats(this._stats, clientStats), true);
I add new method at https://github.com/webpack/webpack-dev-server/blob/3d3d912a69aadc8c5f0c92119dd25100338acd8f/lib/Server.js#L676
Server.prototype._buildStats = function(stats, clientStats) { var o = stats.toJson(clientStats); if(stats.hash) o.hash = stats.hash; return o; };
... I THINK THE 2 THINGS TOGETHER STOP "[HMR] Updated modules: ..." from working
"webpack": "^4.5.0", "webpack-dev-server": "^3.1.2"