source: trip-planner-front/node_modules/webpack/hot/log-apply-result.js@ 6fe77af

Last change on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Tobias Koppers @sokra
4*/
5module.exports = function (updatedModules, renewedModules) {
6 var unacceptedModules = updatedModules.filter(function (moduleId) {
7 return renewedModules && renewedModules.indexOf(moduleId) < 0;
8 });
9 var log = require("./log");
10
11 if (unacceptedModules.length > 0) {
12 log(
13 "warning",
14 "[HMR] The following modules couldn't be hot updated: (They would need a full reload!)"
15 );
16 unacceptedModules.forEach(function (moduleId) {
17 log("warning", "[HMR] - " + moduleId);
18 });
19 }
20
21 if (!renewedModules || renewedModules.length === 0) {
22 log("info", "[HMR] Nothing hot updated.");
23 } else {
24 log("info", "[HMR] Updated modules:");
25 renewedModules.forEach(function (moduleId) {
26 if (typeof moduleId === "string" && moduleId.indexOf("!") !== -1) {
27 var parts = moduleId.split("!");
28 log.groupCollapsed("info", "[HMR] - " + parts.pop());
29 log("info", "[HMR] - " + moduleId);
30 log.groupEnd("info");
31 } else {
32 log("info", "[HMR] - " + moduleId);
33 }
34 });
35 var numberIds = renewedModules.every(function (moduleId) {
36 return typeof moduleId === "number";
37 });
38 if (numberIds)
39 log(
40 "info",
41 '[HMR] Consider using the optimization.moduleIds: "named" for module names.'
42 );
43 }
44};
Note: See TracBrowser for help on using the repository browser.