Crashed in hot reload, version 3.3.0
- Operating System: MacOS
- Node Version: 10.15.2
- NPM Version: 6.4.1
- webpack Version: 4.28.2
- webpack-dev-server Version: 3.3.0
- [x] This is a bug
- [ ] This is a modification request
Code
Error
dev-server.js:9 Uncaught TypeError: Cannot read property 'indexOf' of undefined
at upToDate (webpack:///(:8888/webpack)/hot/dev-server.js?:9:19)
at EventEmitter.eval (webpack:///(:8888/webpack)/hot/dev-server.js?:53:8)
at EventEmitter.emit (events.js:151)
at reloadApp (webpack:///(:8888/webpack)-dev-server/client?:269:16)
at Object.ok (webpack:///(:8888/webpack)-dev-server/client?:163:5)
at SockJS.onmessage (webpack:///(:8888/webpack)-dev-server/client/socket.js?:40:25)
at SockJS.EventTarget.dispatchEvent (sockjs.js:170)
at eval (sockjs.js:887)
at Array.forEach (<anonymous>)
at SockJS._transportMessage (sockjs.js:885)
at WebSocketTransport.EventEmitter.emit (sockjs.js:86)
at WebSocketTransport.ws.onmessage (sockjs.js:2961)
dev-server.js:9
var upToDate = function upToDate() {
return lastHash.indexOf(__webpack_require__.h()) >= 0;
};
Expected Behavior
HMR work correctly
Actual Behavior
Crashed in hot reload mode
For Bugs; How can we reproduce the behavior?
For Features; What is the motivation and/or use-case for the feature?
Please submit a reproducible repo.
I think problem in stats (now we respect their from config, but looks we forget something defined)
@bryfroze Anyway please create minimum reproducible test repo, thanks
This seems as if it might be a regression, for which there was a previous fix, #1366. In our case at least, we typically have hash: false set in our stats options, and see this issue. Setting the hash flag to true resolves the issue.
Yep, it is regression we already works on this
When will this fix be put into a release?
yes
@livemixlove A release was tagged yesterday: https://github.com/webpack/webpack-dev-server/releases/tag/v3.3.1