Skip to content

Commit 5efc245

Browse files
committedNov 17, 2016
Bring back reloading the app after compiler warnings
With ed07c65, reloading the app after compiler errors AND warnings was removed. For errors this makes sense, since when there is an error, the bundle doesn't change. With warnings though, the bundle could have been changed. Fixes #697
1 parent 2a74a08 commit 5efc245

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎client/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,15 @@ var onSocketMsg = {
8181
self.location.reload();
8282
},
8383
warnings: function(warnings) {
84-
log("info", "[WDS] Warnings while compiling. Reload prevented.");
84+
log("info", "[WDS] Warnings while compiling.");
8585
var strippedWarnings = warnings.map(function(warning) {
8686
return stripAnsi(warning);
8787
});
8888
sendMsg("Warnings", strippedWarnings);
8989
for(var i = 0; i < strippedWarnings.length; i++)
9090
console.warn(strippedWarnings[i]);
91+
if(initial) return initial = false;
92+
reloadApp();
9193
},
9294
errors: function(errors) {
9395
log("info", "[WDS] Errors while compiling. Reload prevented.");

0 commit comments

Comments
 (0)
Please sign in to comment.