diff options
author | 2020-11-16 00:10:28 +0100 | |
---|---|---|
committer | 2020-11-16 00:10:28 +0100 | |
commit | e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d (patch) | |
tree | 55713f725f77b44ebfec86e4eec3ce33e71458ca /node_modules/webpack/hot/log-apply-result.js | |
download | website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.tar.gz website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.tar.bz2 website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.zip |
api, login, auth
Diffstat (limited to 'node_modules/webpack/hot/log-apply-result.js')
-rw-r--r-- | node_modules/webpack/hot/log-apply-result.js | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/node_modules/webpack/hot/log-apply-result.js b/node_modules/webpack/hot/log-apply-result.js new file mode 100644 index 0000000..b63e757 --- /dev/null +++ b/node_modules/webpack/hot/log-apply-result.js @@ -0,0 +1,44 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +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) { + log( + "warning", + "[HMR] The following modules couldn't be hot updated: (They would need a full reload!)" + ); + unacceptedModules.forEach(function(moduleId) { + log("warning", "[HMR] - " + moduleId); + }); + } + + if (!renewedModules || renewedModules.length === 0) { + log("info", "[HMR] Nothing hot updated."); + } else { + log("info", "[HMR] Updated modules:"); + renewedModules.forEach(function(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) + log( + "info", + "[HMR] Consider using the NamedModulesPlugin for module names." + ); + } +}; |