MCPcopy
hub / github.com/webpack/webpack / onAccepted

Function onAccepted

lib/hmr/HotModuleReplacement.runtime.js:499–521  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

497 * @returns {Promise<ModuleId[]>} updated module ids
498 */
499 var onAccepted = function () {
500 return Promise.all([disposePromise, applyPromise]).then(function () {
501 // handle errors in accept handlers and self accepted module load
502 if (error) {
503 return setStatus("fail").then(function () {
504 throw error;
505 });
506 }
507
508 if (queuedInvalidatedModules) {
509 return internalApply(options).then(function (list) {
510 outdatedModules.forEach(function (moduleId) {
511 if (list.indexOf(moduleId) < 0) list.push(moduleId);
512 });
513 return list;
514 });
515 }
516
517 return setStatus("idle").then(function () {
518 return outdatedModules;
519 });
520 });
521 };
522
523 return Promise.all(
524 results

Callers

nothing calls this directly

Calls 4

setStatusFunction · 0.85
internalApplyFunction · 0.85
forEachMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected