Skip to content

Commit

Permalink
Merge pull request #254 from Aetherall/patch-1
Browse files Browse the repository at this point in the history
Better debugging
  • Loading branch information
glenjamin committed Oct 16, 2017
2 parents 7c741e4 + 70660c8 commit a1e5c8b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion process-update.js
Expand Up @@ -14,7 +14,21 @@ var hmrDocsUrl = "https://webpack.js.org/concepts/hot-module-replacement/"; // e

var lastHash;
var failureStatuses = { abort: 1, fail: 1 };
var applyOptions = { ignoreUnaccepted: true };
var applyOptions = {
ignoreUnaccepted: true,
ignoreDeclined: true,
ignoreErrored: true,
onUnaccepted: function(data) {
console.warn("Ignored an update to unaccepted module " + data.chain.join(" -> "));
},
onDeclined: function(data) {
console.warn("Ignored an update to declined module " + data.chain.join(" -> "));
},
onErrored: function(data) {
console.error(data.error);
console.warn("Ignored an error while updating module " + data.moduleId + " (" + data.type + ")");
}
}

function upToDate(hash) {
if (hash) lastHash = hash;
Expand Down

0 comments on commit a1e5c8b

Please sign in to comment.