From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 05:01:11 +0200 Subject: node_modules --- node_modules/webpack/hot/dev-server.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'node_modules/webpack/hot/dev-server.js') diff --git a/node_modules/webpack/hot/dev-server.js b/node_modules/webpack/hot/dev-server.js index da39afedd..95894674d 100644 --- a/node_modules/webpack/hot/dev-server.js +++ b/node_modules/webpack/hot/dev-server.js @@ -8,11 +8,12 @@ if(module.hot) { var upToDate = function upToDate() { return lastHash.indexOf(__webpack_hash__) >= 0; }; + var log = require("./log"); var check = function check() { module.hot.check(true).then(function(updatedModules) { if(!updatedModules) { - console.warn("[HMR] Cannot find update. Need to do a full reload!"); - console.warn("[HMR] (Probably because of restarting the webpack-dev-server)"); + log("warning", "[HMR] Cannot find update. Need to do a full reload!"); + log("warning", "[HMR] (Probably because of restarting the webpack-dev-server)"); window.location.reload(); return; } @@ -24,17 +25,17 @@ if(module.hot) { require("./log-apply-result")(updatedModules, updatedModules); if(upToDate()) { - console.log("[HMR] App is up to date."); + log("info", "[HMR] App is up to date."); } }).catch(function(err) { var status = module.hot.status(); if(["abort", "fail"].indexOf(status) >= 0) { - console.warn("[HMR] Cannot apply update. Need to do a full reload!"); - console.warn("[HMR] " + err.stack || err.message); + log("warning", "[HMR] Cannot apply update. Need to do a full reload!"); + log("warning", "[HMR] " + err.stack || err.message); window.location.reload(); } else { - console.warn("[HMR] Update failed: " + err.stack || err.message); + log("warning", "[HMR] Update failed: " + err.stack || err.message); } }); }; @@ -42,11 +43,11 @@ if(module.hot) { hotEmitter.on("webpackHotUpdate", function(currentHash) { lastHash = currentHash; if(!upToDate() && module.hot.status() === "idle") { - console.log("[HMR] Checking for updates on the server..."); + log("info", "[HMR] Checking for updates on the server..."); check(); } }); - console.log("[HMR] Waiting for update signal from WDS..."); + log("info", "[HMR] Waiting for update signal from WDS..."); } else { throw new Error("[HMR] Hot Module Replacement is disabled."); } -- cgit v1.2.3