HotModuleReplacement.runtime.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. // eslint-disable no-unused-vars
  6. var $hash$ = undefined;
  7. var $requestTimeout$ = undefined;
  8. var installedModules = undefined;
  9. var $require$ = undefined;
  10. var hotDownloadManifest = undefined;
  11. var hotDownloadUpdateChunk = undefined;
  12. var hotDisposeChunk = undefined;
  13. var modules = undefined;
  14. var chunkId = undefined;
  15. module.exports = function() {
  16. var hotApplyOnUpdate = true;
  17. // eslint-disable-next-line no-unused-vars
  18. var hotCurrentHash = $hash$;
  19. var hotRequestTimeout = $requestTimeout$;
  20. var hotCurrentModuleData = {};
  21. var hotCurrentChildModule;
  22. // eslint-disable-next-line no-unused-vars
  23. var hotCurrentParents = [];
  24. // eslint-disable-next-line no-unused-vars
  25. var hotCurrentParentsTemp = [];
  26. // eslint-disable-next-line no-unused-vars
  27. function hotCreateRequire(moduleId) {
  28. var me = installedModules[moduleId];
  29. if (!me) return $require$;
  30. var fn = function(request) {
  31. if (me.hot.active) {
  32. if (installedModules[request]) {
  33. if (installedModules[request].parents.indexOf(moduleId) === -1) {
  34. installedModules[request].parents.push(moduleId);
  35. }
  36. } else {
  37. hotCurrentParents = [moduleId];
  38. hotCurrentChildModule = request;
  39. }
  40. if (me.children.indexOf(request) === -1) {
  41. me.children.push(request);
  42. }
  43. } else {
  44. console.warn(
  45. "[HMR] unexpected require(" +
  46. request +
  47. ") from disposed module " +
  48. moduleId
  49. );
  50. hotCurrentParents = [];
  51. }
  52. return $require$(request);
  53. };
  54. var ObjectFactory = function ObjectFactory(name) {
  55. return {
  56. configurable: true,
  57. enumerable: true,
  58. get: function() {
  59. return $require$[name];
  60. },
  61. set: function(value) {
  62. $require$[name] = value;
  63. }
  64. };
  65. };
  66. for (var name in $require$) {
  67. if (
  68. Object.prototype.hasOwnProperty.call($require$, name) &&
  69. name !== "e" &&
  70. name !== "t"
  71. ) {
  72. Object.defineProperty(fn, name, ObjectFactory(name));
  73. }
  74. }
  75. fn.e = function(chunkId) {
  76. if (hotStatus === "ready") hotSetStatus("prepare");
  77. hotChunksLoading++;
  78. return $require$.e(chunkId).then(finishChunkLoading, function(err) {
  79. finishChunkLoading();
  80. throw err;
  81. });
  82. function finishChunkLoading() {
  83. hotChunksLoading--;
  84. if (hotStatus === "prepare") {
  85. if (!hotWaitingFilesMap[chunkId]) {
  86. hotEnsureUpdateChunk(chunkId);
  87. }
  88. if (hotChunksLoading === 0 && hotWaitingFiles === 0) {
  89. hotUpdateDownloaded();
  90. }
  91. }
  92. }
  93. };
  94. fn.t = function(value, mode) {
  95. if (mode & 1) value = fn(value);
  96. return $require$.t(value, mode & ~1);
  97. };
  98. return fn;
  99. }
  100. // eslint-disable-next-line no-unused-vars
  101. function hotCreateModule(moduleId) {
  102. var hot = {
  103. // private stuff
  104. _acceptedDependencies: {},
  105. _declinedDependencies: {},
  106. _selfAccepted: false,
  107. _selfDeclined: false,
  108. _selfInvalidated: false,
  109. _disposeHandlers: [],
  110. _main: hotCurrentChildModule !== moduleId,
  111. // Module API
  112. active: true,
  113. accept: function(dep, callback) {
  114. if (dep === undefined) hot._selfAccepted = true;
  115. else if (typeof dep === "function") hot._selfAccepted = dep;
  116. else if (typeof dep === "object")
  117. for (var i = 0; i < dep.length; i++)
  118. hot._acceptedDependencies[dep[i]] = callback || function() {};
  119. else hot._acceptedDependencies[dep] = callback || function() {};
  120. },
  121. decline: function(dep) {
  122. if (dep === undefined) hot._selfDeclined = true;
  123. else if (typeof dep === "object")
  124. for (var i = 0; i < dep.length; i++)
  125. hot._declinedDependencies[dep[i]] = true;
  126. else hot._declinedDependencies[dep] = true;
  127. },
  128. dispose: function(callback) {
  129. hot._disposeHandlers.push(callback);
  130. },
  131. addDisposeHandler: function(callback) {
  132. hot._disposeHandlers.push(callback);
  133. },
  134. removeDisposeHandler: function(callback) {
  135. var idx = hot._disposeHandlers.indexOf(callback);
  136. if (idx >= 0) hot._disposeHandlers.splice(idx, 1);
  137. },
  138. invalidate: function() {
  139. this._selfInvalidated = true;
  140. switch (hotStatus) {
  141. case "idle":
  142. hotUpdate = {};
  143. hotUpdate[moduleId] = modules[moduleId];
  144. hotSetStatus("ready");
  145. break;
  146. case "ready":
  147. hotApplyInvalidatedModule(moduleId);
  148. break;
  149. case "prepare":
  150. case "check":
  151. case "dispose":
  152. case "apply":
  153. (hotQueuedInvalidatedModules =
  154. hotQueuedInvalidatedModules || []).push(moduleId);
  155. break;
  156. default:
  157. // ignore requests in error states
  158. break;
  159. }
  160. },
  161. // Management API
  162. check: hotCheck,
  163. apply: hotApply,
  164. status: function(l) {
  165. if (!l) return hotStatus;
  166. hotStatusHandlers.push(l);
  167. },
  168. addStatusHandler: function(l) {
  169. hotStatusHandlers.push(l);
  170. },
  171. removeStatusHandler: function(l) {
  172. var idx = hotStatusHandlers.indexOf(l);
  173. if (idx >= 0) hotStatusHandlers.splice(idx, 1);
  174. },
  175. //inherit from previous dispose call
  176. data: hotCurrentModuleData[moduleId]
  177. };
  178. hotCurrentChildModule = undefined;
  179. return hot;
  180. }
  181. var hotStatusHandlers = [];
  182. var hotStatus = "idle";
  183. function hotSetStatus(newStatus) {
  184. hotStatus = newStatus;
  185. for (var i = 0; i < hotStatusHandlers.length; i++)
  186. hotStatusHandlers[i].call(null, newStatus);
  187. }
  188. // while downloading
  189. var hotWaitingFiles = 0;
  190. var hotChunksLoading = 0;
  191. var hotWaitingFilesMap = {};
  192. var hotRequestedFilesMap = {};
  193. var hotAvailableFilesMap = {};
  194. var hotDeferred;
  195. // The update info
  196. var hotUpdate, hotUpdateNewHash, hotQueuedInvalidatedModules;
  197. function toModuleId(id) {
  198. var isNumber = +id + "" === id;
  199. return isNumber ? +id : id;
  200. }
  201. function hotCheck(apply) {
  202. if (hotStatus !== "idle") {
  203. throw new Error("check() is only allowed in idle status");
  204. }
  205. hotApplyOnUpdate = apply;
  206. hotSetStatus("check");
  207. return hotDownloadManifest(hotRequestTimeout).then(function(update) {
  208. if (!update) {
  209. hotSetStatus(hotApplyInvalidatedModules() ? "ready" : "idle");
  210. return null;
  211. }
  212. hotRequestedFilesMap = {};
  213. hotWaitingFilesMap = {};
  214. hotAvailableFilesMap = update.c;
  215. hotUpdateNewHash = update.h;
  216. hotSetStatus("prepare");
  217. var promise = new Promise(function(resolve, reject) {
  218. hotDeferred = {
  219. resolve: resolve,
  220. reject: reject
  221. };
  222. });
  223. hotUpdate = {};
  224. /*foreachInstalledChunks*/
  225. // eslint-disable-next-line no-lone-blocks
  226. {
  227. hotEnsureUpdateChunk(chunkId);
  228. }
  229. if (
  230. hotStatus === "prepare" &&
  231. hotChunksLoading === 0 &&
  232. hotWaitingFiles === 0
  233. ) {
  234. hotUpdateDownloaded();
  235. }
  236. return promise;
  237. });
  238. }
  239. // eslint-disable-next-line no-unused-vars
  240. function hotAddUpdateChunk(chunkId, moreModules) {
  241. if (!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
  242. return;
  243. hotRequestedFilesMap[chunkId] = false;
  244. for (var moduleId in moreModules) {
  245. if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
  246. hotUpdate[moduleId] = moreModules[moduleId];
  247. }
  248. }
  249. if (--hotWaitingFiles === 0 && hotChunksLoading === 0) {
  250. hotUpdateDownloaded();
  251. }
  252. }
  253. function hotEnsureUpdateChunk(chunkId) {
  254. if (!hotAvailableFilesMap[chunkId]) {
  255. hotWaitingFilesMap[chunkId] = true;
  256. } else {
  257. hotRequestedFilesMap[chunkId] = true;
  258. hotWaitingFiles++;
  259. hotDownloadUpdateChunk(chunkId);
  260. }
  261. }
  262. function hotUpdateDownloaded() {
  263. hotSetStatus("ready");
  264. var deferred = hotDeferred;
  265. hotDeferred = null;
  266. if (!deferred) return;
  267. if (hotApplyOnUpdate) {
  268. // Wrap deferred object in Promise to mark it as a well-handled Promise to
  269. // avoid triggering uncaught exception warning in Chrome.
  270. // See https://bugs.chromium.org/p/chromium/issues/detail?id=465666
  271. Promise.resolve()
  272. .then(function() {
  273. return hotApply(hotApplyOnUpdate);
  274. })
  275. .then(
  276. function(result) {
  277. deferred.resolve(result);
  278. },
  279. function(err) {
  280. deferred.reject(err);
  281. }
  282. );
  283. } else {
  284. var outdatedModules = [];
  285. for (var id in hotUpdate) {
  286. if (Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
  287. outdatedModules.push(toModuleId(id));
  288. }
  289. }
  290. deferred.resolve(outdatedModules);
  291. }
  292. }
  293. function hotApply(options) {
  294. if (hotStatus !== "ready")
  295. throw new Error("apply() is only allowed in ready status");
  296. options = options || {};
  297. return hotApplyInternal(options);
  298. }
  299. function hotApplyInternal(options) {
  300. hotApplyInvalidatedModules();
  301. var cb;
  302. var i;
  303. var j;
  304. var module;
  305. var moduleId;
  306. function getAffectedStuff(updateModuleId) {
  307. var outdatedModules = [updateModuleId];
  308. var outdatedDependencies = {};
  309. var queue = outdatedModules.map(function(id) {
  310. return {
  311. chain: [id],
  312. id: id
  313. };
  314. });
  315. while (queue.length > 0) {
  316. var queueItem = queue.pop();
  317. var moduleId = queueItem.id;
  318. var chain = queueItem.chain;
  319. module = installedModules[moduleId];
  320. if (
  321. !module ||
  322. (module.hot._selfAccepted && !module.hot._selfInvalidated)
  323. )
  324. continue;
  325. if (module.hot._selfDeclined) {
  326. return {
  327. type: "self-declined",
  328. chain: chain,
  329. moduleId: moduleId
  330. };
  331. }
  332. if (module.hot._main) {
  333. return {
  334. type: "unaccepted",
  335. chain: chain,
  336. moduleId: moduleId
  337. };
  338. }
  339. for (var i = 0; i < module.parents.length; i++) {
  340. var parentId = module.parents[i];
  341. var parent = installedModules[parentId];
  342. if (!parent) continue;
  343. if (parent.hot._declinedDependencies[moduleId]) {
  344. return {
  345. type: "declined",
  346. chain: chain.concat([parentId]),
  347. moduleId: moduleId,
  348. parentId: parentId
  349. };
  350. }
  351. if (outdatedModules.indexOf(parentId) !== -1) continue;
  352. if (parent.hot._acceptedDependencies[moduleId]) {
  353. if (!outdatedDependencies[parentId])
  354. outdatedDependencies[parentId] = [];
  355. addAllToSet(outdatedDependencies[parentId], [moduleId]);
  356. continue;
  357. }
  358. delete outdatedDependencies[parentId];
  359. outdatedModules.push(parentId);
  360. queue.push({
  361. chain: chain.concat([parentId]),
  362. id: parentId
  363. });
  364. }
  365. }
  366. return {
  367. type: "accepted",
  368. moduleId: updateModuleId,
  369. outdatedModules: outdatedModules,
  370. outdatedDependencies: outdatedDependencies
  371. };
  372. }
  373. function addAllToSet(a, b) {
  374. for (var i = 0; i < b.length; i++) {
  375. var item = b[i];
  376. if (a.indexOf(item) === -1) a.push(item);
  377. }
  378. }
  379. // at begin all updates modules are outdated
  380. // the "outdated" status can propagate to parents if they don't accept the children
  381. var outdatedDependencies = {};
  382. var outdatedModules = [];
  383. var appliedUpdate = {};
  384. var warnUnexpectedRequire = function warnUnexpectedRequire() {
  385. console.warn(
  386. "[HMR] unexpected require(" + result.moduleId + ") to disposed module"
  387. );
  388. };
  389. for (var id in hotUpdate) {
  390. if (Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
  391. moduleId = toModuleId(id);
  392. /** @type {TODO} */
  393. var result;
  394. if (hotUpdate[id]) {
  395. result = getAffectedStuff(moduleId);
  396. } else {
  397. result = {
  398. type: "disposed",
  399. moduleId: id
  400. };
  401. }
  402. /** @type {Error|false} */
  403. var abortError = false;
  404. var doApply = false;
  405. var doDispose = false;
  406. var chainInfo = "";
  407. if (result.chain) {
  408. chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
  409. }
  410. switch (result.type) {
  411. case "self-declined":
  412. if (options.onDeclined) options.onDeclined(result);
  413. if (!options.ignoreDeclined)
  414. abortError = new Error(
  415. "Aborted because of self decline: " +
  416. result.moduleId +
  417. chainInfo
  418. );
  419. break;
  420. case "declined":
  421. if (options.onDeclined) options.onDeclined(result);
  422. if (!options.ignoreDeclined)
  423. abortError = new Error(
  424. "Aborted because of declined dependency: " +
  425. result.moduleId +
  426. " in " +
  427. result.parentId +
  428. chainInfo
  429. );
  430. break;
  431. case "unaccepted":
  432. if (options.onUnaccepted) options.onUnaccepted(result);
  433. if (!options.ignoreUnaccepted)
  434. abortError = new Error(
  435. "Aborted because " + moduleId + " is not accepted" + chainInfo
  436. );
  437. break;
  438. case "accepted":
  439. if (options.onAccepted) options.onAccepted(result);
  440. doApply = true;
  441. break;
  442. case "disposed":
  443. if (options.onDisposed) options.onDisposed(result);
  444. doDispose = true;
  445. break;
  446. default:
  447. throw new Error("Unexception type " + result.type);
  448. }
  449. if (abortError) {
  450. hotSetStatus("abort");
  451. return Promise.reject(abortError);
  452. }
  453. if (doApply) {
  454. appliedUpdate[moduleId] = hotUpdate[moduleId];
  455. addAllToSet(outdatedModules, result.outdatedModules);
  456. for (moduleId in result.outdatedDependencies) {
  457. if (
  458. Object.prototype.hasOwnProperty.call(
  459. result.outdatedDependencies,
  460. moduleId
  461. )
  462. ) {
  463. if (!outdatedDependencies[moduleId])
  464. outdatedDependencies[moduleId] = [];
  465. addAllToSet(
  466. outdatedDependencies[moduleId],
  467. result.outdatedDependencies[moduleId]
  468. );
  469. }
  470. }
  471. }
  472. if (doDispose) {
  473. addAllToSet(outdatedModules, [result.moduleId]);
  474. appliedUpdate[moduleId] = warnUnexpectedRequire;
  475. }
  476. }
  477. }
  478. // Store self accepted outdated modules to require them later by the module system
  479. var outdatedSelfAcceptedModules = [];
  480. for (i = 0; i < outdatedModules.length; i++) {
  481. moduleId = outdatedModules[i];
  482. if (
  483. installedModules[moduleId] &&
  484. installedModules[moduleId].hot._selfAccepted &&
  485. // removed self-accepted modules should not be required
  486. appliedUpdate[moduleId] !== warnUnexpectedRequire &&
  487. // when called invalidate self-accepting is not possible
  488. !installedModules[moduleId].hot._selfInvalidated
  489. ) {
  490. outdatedSelfAcceptedModules.push({
  491. module: moduleId,
  492. parents: installedModules[moduleId].parents.slice(),
  493. errorHandler: installedModules[moduleId].hot._selfAccepted
  494. });
  495. }
  496. }
  497. // Now in "dispose" phase
  498. hotSetStatus("dispose");
  499. Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
  500. if (hotAvailableFilesMap[chunkId] === false) {
  501. hotDisposeChunk(chunkId);
  502. }
  503. });
  504. var idx;
  505. var queue = outdatedModules.slice();
  506. while (queue.length > 0) {
  507. moduleId = queue.pop();
  508. module = installedModules[moduleId];
  509. if (!module) continue;
  510. var data = {};
  511. // Call dispose handlers
  512. var disposeHandlers = module.hot._disposeHandlers;
  513. for (j = 0; j < disposeHandlers.length; j++) {
  514. cb = disposeHandlers[j];
  515. cb(data);
  516. }
  517. hotCurrentModuleData[moduleId] = data;
  518. // disable module (this disables requires from this module)
  519. module.hot.active = false;
  520. // remove module from cache
  521. delete installedModules[moduleId];
  522. // when disposing there is no need to call dispose handler
  523. delete outdatedDependencies[moduleId];
  524. // remove "parents" references from all children
  525. for (j = 0; j < module.children.length; j++) {
  526. var child = installedModules[module.children[j]];
  527. if (!child) continue;
  528. idx = child.parents.indexOf(moduleId);
  529. if (idx >= 0) {
  530. child.parents.splice(idx, 1);
  531. }
  532. }
  533. }
  534. // remove outdated dependency from module children
  535. var dependency;
  536. var moduleOutdatedDependencies;
  537. for (moduleId in outdatedDependencies) {
  538. if (
  539. Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)
  540. ) {
  541. module = installedModules[moduleId];
  542. if (module) {
  543. moduleOutdatedDependencies = outdatedDependencies[moduleId];
  544. for (j = 0; j < moduleOutdatedDependencies.length; j++) {
  545. dependency = moduleOutdatedDependencies[j];
  546. idx = module.children.indexOf(dependency);
  547. if (idx >= 0) module.children.splice(idx, 1);
  548. }
  549. }
  550. }
  551. }
  552. // Now in "apply" phase
  553. hotSetStatus("apply");
  554. if (hotUpdateNewHash !== undefined) {
  555. hotCurrentHash = hotUpdateNewHash;
  556. hotUpdateNewHash = undefined;
  557. }
  558. hotUpdate = undefined;
  559. // insert new code
  560. for (moduleId in appliedUpdate) {
  561. if (Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
  562. modules[moduleId] = appliedUpdate[moduleId];
  563. }
  564. }
  565. // call accept handlers
  566. var error = null;
  567. for (moduleId in outdatedDependencies) {
  568. if (
  569. Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)
  570. ) {
  571. module = installedModules[moduleId];
  572. if (module) {
  573. moduleOutdatedDependencies = outdatedDependencies[moduleId];
  574. var callbacks = [];
  575. for (i = 0; i < moduleOutdatedDependencies.length; i++) {
  576. dependency = moduleOutdatedDependencies[i];
  577. cb = module.hot._acceptedDependencies[dependency];
  578. if (cb) {
  579. if (callbacks.indexOf(cb) !== -1) continue;
  580. callbacks.push(cb);
  581. }
  582. }
  583. for (i = 0; i < callbacks.length; i++) {
  584. cb = callbacks[i];
  585. try {
  586. cb(moduleOutdatedDependencies);
  587. } catch (err) {
  588. if (options.onErrored) {
  589. options.onErrored({
  590. type: "accept-errored",
  591. moduleId: moduleId,
  592. dependencyId: moduleOutdatedDependencies[i],
  593. error: err
  594. });
  595. }
  596. if (!options.ignoreErrored) {
  597. if (!error) error = err;
  598. }
  599. }
  600. }
  601. }
  602. }
  603. }
  604. // Load self accepted modules
  605. for (i = 0; i < outdatedSelfAcceptedModules.length; i++) {
  606. var item = outdatedSelfAcceptedModules[i];
  607. moduleId = item.module;
  608. hotCurrentParents = item.parents;
  609. hotCurrentChildModule = moduleId;
  610. try {
  611. $require$(moduleId);
  612. } catch (err) {
  613. if (typeof item.errorHandler === "function") {
  614. try {
  615. item.errorHandler(err);
  616. } catch (err2) {
  617. if (options.onErrored) {
  618. options.onErrored({
  619. type: "self-accept-error-handler-errored",
  620. moduleId: moduleId,
  621. error: err2,
  622. originalError: err
  623. });
  624. }
  625. if (!options.ignoreErrored) {
  626. if (!error) error = err2;
  627. }
  628. if (!error) error = err;
  629. }
  630. } else {
  631. if (options.onErrored) {
  632. options.onErrored({
  633. type: "self-accept-errored",
  634. moduleId: moduleId,
  635. error: err
  636. });
  637. }
  638. if (!options.ignoreErrored) {
  639. if (!error) error = err;
  640. }
  641. }
  642. }
  643. }
  644. // handle errors in accept handlers and self accepted module load
  645. if (error) {
  646. hotSetStatus("fail");
  647. return Promise.reject(error);
  648. }
  649. if (hotQueuedInvalidatedModules) {
  650. return hotApplyInternal(options).then(function(list) {
  651. outdatedModules.forEach(function(moduleId) {
  652. if (list.indexOf(moduleId) < 0) list.push(moduleId);
  653. });
  654. return list;
  655. });
  656. }
  657. hotSetStatus("idle");
  658. return new Promise(function(resolve) {
  659. resolve(outdatedModules);
  660. });
  661. }
  662. function hotApplyInvalidatedModules() {
  663. if (hotQueuedInvalidatedModules) {
  664. if (!hotUpdate) hotUpdate = {};
  665. hotQueuedInvalidatedModules.forEach(hotApplyInvalidatedModule);
  666. hotQueuedInvalidatedModules = undefined;
  667. return true;
  668. }
  669. }
  670. function hotApplyInvalidatedModule(moduleId) {
  671. if (!Object.prototype.hasOwnProperty.call(hotUpdate, moduleId))
  672. hotUpdate[moduleId] = modules[moduleId];
  673. }
  674. };