MCPcopy
hub / github.com/react/create-react-app / hotCreateRequire

Function hotCreateRequire

packages/react-error-overlay/fixtures/bundle.mjs:68–128  ·  view source on GitHub ↗
(moduleId)

Source from the content-addressed store, hash-verified

66/******/ var hotCurrentParentsTemp = []; // eslint-disable-line no-unused-vars
67/******/
68/******/ function hotCreateRequire(moduleId) { // eslint-disable-line no-unused-vars
69/******/ var me = installedModules[moduleId];
70/******/ if(!me) return __webpack_require__;
71/******/ var fn = function(request) {
72/******/ if(me.hot.active) {
73/******/ if(installedModules[request]) {
74/******/ if(installedModules[request].parents.indexOf(moduleId) < 0)
75/******/ installedModules[request].parents.push(moduleId);
76/******/ } else hotCurrentParents = [moduleId];
77/******/ if(me.children.indexOf(request) < 0)
78/******/ me.children.push(request);
79/******/ } else {
80/******/ console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId);
81/******/ hotCurrentParents = [];
82/******/ }
83/******/ hotMainModule = false;
84/******/ return __webpack_require__(request);
85/******/ };
86/******/ var ObjectFactory = function ObjectFactory(name) {
87/******/ return {
88/******/ configurable: true,
89/******/ enumerable: true,
90/******/ get: function() {
91/******/ return __webpack_require__[name];
92/******/ },
93/******/ set: function(value) {
94/******/ __webpack_require__[name] = value;
95/******/ }
96/******/ };
97/******/ };
98/******/ for(var name in __webpack_require__) {
99/******/ if(Object.prototype.hasOwnProperty.call(__webpack_require__, name)) {
100/******/ Object.defineProperty(fn, name, ObjectFactory(name));
101/******/ }
102/******/ }
103/******/ Object.defineProperty(fn, "e", {
104/******/ enumerable: true,
105/******/ value: function(chunkId) {
106/******/ if(hotStatus === "ready")
107/******/ hotSetStatus("prepare");
108/******/ hotChunksLoading++;
109/******/ return __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {
110/******/ finishChunkLoading();
111/******/ throw err;
112/******/ });
113/******/
114/******/ function finishChunkLoading() {
115/******/ hotChunksLoading--;
116/******/ if(hotStatus === "prepare") {
117/******/ if(!hotWaitingFilesMap[chunkId]) {
118/******/ hotEnsureUpdateChunk(chunkId);
119/******/ }
120/******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) {
121/******/ hotUpdateDownloaded();
122/******/ }
123/******/ }
124/******/ }
125/******/ }

Callers 2

__webpack_require__Function · 0.70
bundle.mjsFile · 0.70

Calls 3

ObjectFactoryFunction · 0.70
hotSetStatusFunction · 0.70
finishChunkLoadingFunction · 0.70

Tested by

no test coverage detected