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/log-apply-result.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'node_modules/webpack/hot/log-apply-result.js') diff --git a/node_modules/webpack/hot/log-apply-result.js b/node_modules/webpack/hot/log-apply-result.js index 96c900b9f..8a312b3c6 100644 --- a/node_modules/webpack/hot/log-apply-result.js +++ b/node_modules/webpack/hot/log-apply-result.js @@ -6,25 +6,33 @@ module.exports = function(updatedModules, renewedModules) { var unacceptedModules = updatedModules.filter(function(moduleId) { return renewedModules && renewedModules.indexOf(moduleId) < 0; }); + var log = require("./log"); if(unacceptedModules.length > 0) { - console.warn("[HMR] The following modules couldn't be hot updated: (They would need a full reload!)"); + log("warning", "[HMR] The following modules couldn't be hot updated: (They would need a full reload!)"); unacceptedModules.forEach(function(moduleId) { - console.warn("[HMR] - " + moduleId); + log("warning", "[HMR] - " + moduleId); }); } if(!renewedModules || renewedModules.length === 0) { - console.log("[HMR] Nothing hot updated."); + log("info", "[HMR] Nothing hot updated."); } else { - console.log("[HMR] Updated modules:"); + log("info", "[HMR] Updated modules:"); renewedModules.forEach(function(moduleId) { - console.log("[HMR] - " + moduleId); + if(typeof moduleId === "string" && moduleId.indexOf("!") !== -1) { + var parts = moduleId.split("!"); + log.groupCollapsed("info", "[HMR] - " + parts.pop()); + log("info", "[HMR] - " + moduleId); + log.groupEnd("info"); + } else { + log("info", "[HMR] - " + moduleId); + } }); var numberIds = renewedModules.every(function(moduleId) { return typeof moduleId === "number"; }); if(numberIds) - console.log("[HMR] Consider using the NamedModulesPlugin for module names."); + log("info", "[HMR] Consider using the NamedModulesPlugin for module names."); } }; -- cgit v1.2.3