source: imaps-frontend/node_modules/webpack/hot/log-apply-result.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

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