Skip to content

Commit 52f9dcd

Browse files
committed
Warn when restarting the webpack-dev-server while on a page.
1 parent 558ee89 commit 52f9dcd

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

hot/dev-server.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ if(module.hot) {
1515
return;
1616
}
1717

18-
if(!updatedModules)
19-
return console.log("[HMR] No Update found.");
18+
if(!updatedModules) {
19+
console.warn("[HMR] Cannot find update. Need to do a full reload!");
20+
console.warn("[HMR] (Propably because of restarting the webpack-dev-server)")
21+
window.location.reload();
22+
return;
23+
}
2024

2125
if(!upToDate()) {
2226
check();

hot/only-dev-server.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ if(module.hot) {
1414
return;
1515
}
1616

17-
if(!updatedModules)
18-
return console.log("[HMR] No Update found.");
17+
if(!updatedModules) {
18+
console.warn("[HMR] Cannot find update. Need to do a full reload!");
19+
console.warn("[HMR] (Propably because of restarting the webpack-dev-server)")
20+
return;
21+
}
1922

2023
module.hot.apply({
2124
ignoreUnaccepted: true

0 commit comments

Comments
 (0)