Skip to content

Commit 14e6caf

Browse files
authored
Merge pull request webpack#2654 from Kovensky/only-dev-server-not-idle-warning
only-dev-server: Remind user that hot updates stopped
2 parents cf00a1a + 216b435 commit 14e6caf

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

hot/only-dev-server.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,14 @@ if(module.hot) {
5050
var hotEmitter = require("./emitter");
5151
hotEmitter.on("webpackHotUpdate", function(currentHash) {
5252
lastHash = currentHash;
53-
if(!upToDate() && module.hot.status() === "idle") {
54-
console.log("[HMR] Checking for updates on the server...");
55-
check();
53+
if(!upToDate()) {
54+
var status = module.hot.status();
55+
if(status === "idle") {
56+
console.log("[HMR] Checking for updates on the server...");
57+
check();
58+
} else if(["abort", "fail"].indexOf(status) >= 0) {
59+
console.warn("[HMR] Cannot apply update as a previous update " + status + "ed. Need to do a full reload!");
60+
}
5661
}
5762
});
5863
console.log("[HMR] Waiting for update signal from WDS...");

0 commit comments

Comments
 (0)