MCPcopy
hub / github.com/webpack/webpack / handler

Function handler

hot/only-dev-server.js:87–103  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

85 * @param {CustomEvent<{ currentHash: string }>} event event or hash
86 */
87 var handler = function (event) {
88 lastHash = typeof event === "string" ? event : event.detail.currentHash;
89 if (!upToDate()) {
90 var status = module.hot.status();
91 if (status === "idle") {
92 log("info", "[HMR] Checking for updates on the server...");
93 check();
94 } else if (["abort", "fail"].indexOf(status) >= 0) {
95 log(
96 "warning",
97 "[HMR] Cannot apply update as a previous update " +
98 status +
99 "ed. Need to do a full reload!"
100 );
101 }
102 }
103 };
104
105 if (typeof EventTarget !== "undefined" && hotEmitter instanceof EventTarget) {
106 hotEmitter.addEventListener(

Callers

nothing calls this directly

Calls 4

upToDateFunction · 0.70
checkFunction · 0.70
statusMethod · 0.65
logFunction · 0.50

Tested by

no test coverage detected