diff --git a/process-update.js b/process-update.js index 75b5060..79fbaca 100644 --- a/process-update.js +++ b/process-update.js @@ -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;