@umijs/bundler-webpack 4.3.1 → 4.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiled/webpack/ConsumeSharedModule.js +1 -0
- package/compiled/webpack/ConsumeSharedPlugin.check.js +1 -0
- package/compiled/webpack/ConsumeSharedPlugin.json +126 -0
- package/compiled/webpack/Dependency.js +1 -0
- package/compiled/webpack/EntryDependency.js +1 -0
- package/compiled/webpack/ExternalModule.js +1 -0
- package/compiled/webpack/ExternalsType.check.js +1 -0
- package/compiled/webpack/FileSystemInfo.js +1 -0
- package/compiled/webpack/JavascriptHotModuleReplacement.runtime.js +1 -463
- package/compiled/webpack/JavascriptModulesPlugin.js +1 -0
- package/compiled/webpack/LazySet.js +1 -0
- package/compiled/webpack/Module.js +1 -0
- package/compiled/webpack/ModuleDependency.js +1 -0
- package/compiled/webpack/ModuleFactory.js +1 -0
- package/compiled/webpack/ModuleFederationPlugin.js +1 -0
- package/compiled/webpack/ModuleNotFoundError.js +1 -0
- package/compiled/webpack/NodeEnvironmentPlugin.js +1 -0
- package/compiled/webpack/ObjectMiddleware.js +1 -0
- package/compiled/webpack/ResolverFactory.js +1 -0
- package/compiled/webpack/SortableSet.js +1 -0
- package/compiled/webpack/StartupChunkDependenciesPlugin.js +1 -0
- package/compiled/webpack/StaticExportsDependency.js +1 -0
- package/compiled/webpack/TemplatedPathPlugin.js +1 -0
- package/compiled/webpack/WebpackError.js +1 -0
- package/compiled/webpack/comparators.js +1 -0
- package/compiled/webpack/compileBooleanMatcher.js +1 -0
- package/compiled/webpack/create-schema-validation.js +1 -0
- package/compiled/webpack/createHash.js +1 -0
- package/compiled/webpack/deepImports.json +35 -2
- package/compiled/webpack/extractUrlAndGlobal.js +1 -0
- package/compiled/webpack/fs.js +1 -0
- package/compiled/webpack/identifier.js +1 -0
- package/compiled/webpack/index.js +685 -106
- package/compiled/webpack/makeSerializable.js +1 -0
- package/compiled/webpack/semver.js +1 -0
- package/dist/requireHook.js +16 -2
- package/package.json +5 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').ConsumeSharedModule;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').ConsumeSharedPluginCheck;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"definitions": {
|
|
3
|
+
"Consumes": {
|
|
4
|
+
"description": "Modules that should be consumed from share scope. When provided, property names are used to match requested modules in this compilation.",
|
|
5
|
+
"anyOf": [
|
|
6
|
+
{
|
|
7
|
+
"type": "array",
|
|
8
|
+
"items": {
|
|
9
|
+
"description": "Modules that should be consumed from share scope.",
|
|
10
|
+
"anyOf": [
|
|
11
|
+
{
|
|
12
|
+
"$ref": "#/definitions/ConsumesItem"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"$ref": "#/definitions/ConsumesObject"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"$ref": "#/definitions/ConsumesObject"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"ConsumesConfig": {
|
|
26
|
+
"description": "Advanced configuration for modules that should be consumed from share scope.",
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"properties": {
|
|
30
|
+
"eager": {
|
|
31
|
+
"description": "Include the fallback module directly instead behind an async request. This allows to use fallback module in initial load too. All possible shared modules need to be eager too.",
|
|
32
|
+
"type": "boolean"
|
|
33
|
+
},
|
|
34
|
+
"import": {
|
|
35
|
+
"description": "Fallback module if no shared module is found in share scope. Defaults to the property name.",
|
|
36
|
+
"anyOf": [
|
|
37
|
+
{
|
|
38
|
+
"description": "No fallback module.",
|
|
39
|
+
"enum": [
|
|
40
|
+
false
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"$ref": "#/definitions/ConsumesItem"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"packageName": {
|
|
49
|
+
"description": "Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.",
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1
|
|
52
|
+
},
|
|
53
|
+
"requiredVersion": {
|
|
54
|
+
"description": "Version requirement from module in share scope.",
|
|
55
|
+
"anyOf": [
|
|
56
|
+
{
|
|
57
|
+
"description": "No version requirement check.",
|
|
58
|
+
"enum": [
|
|
59
|
+
false
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"description": "Version as string. Can be prefixed with '^' or '~' for minimum matches. Each part of the version should be separated by a dot '.'.",
|
|
64
|
+
"type": "string"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"shareKey": {
|
|
69
|
+
"description": "Module is looked up under this key from the share scope.",
|
|
70
|
+
"type": "string",
|
|
71
|
+
"minLength": 1
|
|
72
|
+
},
|
|
73
|
+
"shareScope": {
|
|
74
|
+
"description": "Share scope name.",
|
|
75
|
+
"type": "string",
|
|
76
|
+
"minLength": 1
|
|
77
|
+
},
|
|
78
|
+
"singleton": {
|
|
79
|
+
"description": "Allow only a single version of the shared module in share scope (disabled by default).",
|
|
80
|
+
"type": "boolean"
|
|
81
|
+
},
|
|
82
|
+
"strictVersion": {
|
|
83
|
+
"description": "Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).",
|
|
84
|
+
"type": "boolean"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"ConsumesItem": {
|
|
89
|
+
"description": "A module that should be consumed from share scope.",
|
|
90
|
+
"type": "string",
|
|
91
|
+
"minLength": 1
|
|
92
|
+
},
|
|
93
|
+
"ConsumesObject": {
|
|
94
|
+
"description": "Modules that should be consumed from share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.",
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": {
|
|
97
|
+
"description": "Modules that should be consumed from share scope.",
|
|
98
|
+
"anyOf": [
|
|
99
|
+
{
|
|
100
|
+
"$ref": "#/definitions/ConsumesConfig"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"$ref": "#/definitions/ConsumesItem"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"title": "ConsumeSharedPluginOptions",
|
|
110
|
+
"description": "Options for consuming shared modules.",
|
|
111
|
+
"type": "object",
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"properties": {
|
|
114
|
+
"consumes": {
|
|
115
|
+
"$ref": "#/definitions/Consumes"
|
|
116
|
+
},
|
|
117
|
+
"shareScope": {
|
|
118
|
+
"description": "Share scope name used for all consumed modules (defaults to 'default').",
|
|
119
|
+
"type": "string",
|
|
120
|
+
"minLength": 1
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"required": [
|
|
124
|
+
"consumes"
|
|
125
|
+
]
|
|
126
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').Dependency;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').EntryDependency;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').ExternalModule;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').ExternalsTypeCheck;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').FileSystemInfo;
|
|
@@ -1,463 +1 @@
|
|
|
1
|
-
|
|
2
|
-
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
3
|
-
Author Tobias Koppers @sokra
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
"use strict";
|
|
7
|
-
|
|
8
|
-
var $installedChunks$ = undefined;
|
|
9
|
-
var $loadUpdateChunk$ = undefined;
|
|
10
|
-
var $moduleCache$ = undefined;
|
|
11
|
-
var $moduleFactories$ = undefined;
|
|
12
|
-
var $ensureChunkHandlers$ = undefined;
|
|
13
|
-
var $hasOwnProperty$ = undefined;
|
|
14
|
-
var $hmrModuleData$ = undefined;
|
|
15
|
-
var $hmrDownloadUpdateHandlers$ = undefined;
|
|
16
|
-
var $hmrInvalidateModuleHandlers$ = undefined;
|
|
17
|
-
var __webpack_require__ = undefined;
|
|
18
|
-
|
|
19
|
-
module.exports = function () {
|
|
20
|
-
var currentUpdateChunks;
|
|
21
|
-
var currentUpdate;
|
|
22
|
-
var currentUpdateRemovedChunks;
|
|
23
|
-
var currentUpdateRuntime;
|
|
24
|
-
function applyHandler(options) {
|
|
25
|
-
if ($ensureChunkHandlers$) delete $ensureChunkHandlers$.$key$Hmr;
|
|
26
|
-
currentUpdateChunks = undefined;
|
|
27
|
-
function getAffectedModuleEffects(updateModuleId) {
|
|
28
|
-
var outdatedModules = [updateModuleId];
|
|
29
|
-
var outdatedDependencies = {};
|
|
30
|
-
|
|
31
|
-
var queue = outdatedModules.map(function (id) {
|
|
32
|
-
return {
|
|
33
|
-
chain: [id],
|
|
34
|
-
id: id
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
while (queue.length > 0) {
|
|
38
|
-
var queueItem = queue.pop();
|
|
39
|
-
var moduleId = queueItem.id;
|
|
40
|
-
var chain = queueItem.chain;
|
|
41
|
-
var module = $moduleCache$[moduleId];
|
|
42
|
-
if (
|
|
43
|
-
!module ||
|
|
44
|
-
(module.hot._selfAccepted && !module.hot._selfInvalidated)
|
|
45
|
-
)
|
|
46
|
-
continue;
|
|
47
|
-
if (module.hot._selfDeclined) {
|
|
48
|
-
return {
|
|
49
|
-
type: "self-declined",
|
|
50
|
-
chain: chain,
|
|
51
|
-
moduleId: moduleId
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
if (module.hot._main) {
|
|
55
|
-
return {
|
|
56
|
-
type: "unaccepted",
|
|
57
|
-
chain: chain,
|
|
58
|
-
moduleId: moduleId
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
for (var i = 0; i < module.parents.length; i++) {
|
|
62
|
-
var parentId = module.parents[i];
|
|
63
|
-
var parent = $moduleCache$[parentId];
|
|
64
|
-
if (!parent) continue;
|
|
65
|
-
if (parent.hot._declinedDependencies[moduleId]) {
|
|
66
|
-
return {
|
|
67
|
-
type: "declined",
|
|
68
|
-
chain: chain.concat([parentId]),
|
|
69
|
-
moduleId: moduleId,
|
|
70
|
-
parentId: parentId
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
if (outdatedModules.indexOf(parentId) !== -1) continue;
|
|
74
|
-
if (parent.hot._acceptedDependencies[moduleId]) {
|
|
75
|
-
if (!outdatedDependencies[parentId])
|
|
76
|
-
outdatedDependencies[parentId] = [];
|
|
77
|
-
addAllToSet(outdatedDependencies[parentId], [moduleId]);
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
delete outdatedDependencies[parentId];
|
|
81
|
-
outdatedModules.push(parentId);
|
|
82
|
-
queue.push({
|
|
83
|
-
chain: chain.concat([parentId]),
|
|
84
|
-
id: parentId
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return {
|
|
90
|
-
type: "accepted",
|
|
91
|
-
moduleId: updateModuleId,
|
|
92
|
-
outdatedModules: outdatedModules,
|
|
93
|
-
outdatedDependencies: outdatedDependencies
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function addAllToSet(a, b) {
|
|
98
|
-
for (var i = 0; i < b.length; i++) {
|
|
99
|
-
var item = b[i];
|
|
100
|
-
if (a.indexOf(item) === -1) a.push(item);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// at begin all updates modules are outdated
|
|
105
|
-
// the "outdated" status can propagate to parents if they don't accept the children
|
|
106
|
-
var outdatedDependencies = {};
|
|
107
|
-
var outdatedModules = [];
|
|
108
|
-
var appliedUpdate = {};
|
|
109
|
-
|
|
110
|
-
var warnUnexpectedRequire = function warnUnexpectedRequire(module) {
|
|
111
|
-
console.warn(
|
|
112
|
-
"[HMR] unexpected require(" + module.id + ") to disposed module"
|
|
113
|
-
);
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
for (var moduleId in currentUpdate) {
|
|
117
|
-
if ($hasOwnProperty$(currentUpdate, moduleId)) {
|
|
118
|
-
var newModuleFactory = currentUpdate[moduleId];
|
|
119
|
-
/** @type {TODO} */
|
|
120
|
-
var result;
|
|
121
|
-
if (newModuleFactory) {
|
|
122
|
-
result = getAffectedModuleEffects(moduleId);
|
|
123
|
-
} else {
|
|
124
|
-
result = {
|
|
125
|
-
type: "disposed",
|
|
126
|
-
moduleId: moduleId
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
/** @type {Error|false} */
|
|
130
|
-
var abortError = false;
|
|
131
|
-
var doApply = false;
|
|
132
|
-
var doDispose = false;
|
|
133
|
-
var chainInfo = "";
|
|
134
|
-
if (result.chain) {
|
|
135
|
-
chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
|
|
136
|
-
}
|
|
137
|
-
switch (result.type) {
|
|
138
|
-
case "self-declined":
|
|
139
|
-
if (options.onDeclined) options.onDeclined(result);
|
|
140
|
-
if (!options.ignoreDeclined)
|
|
141
|
-
abortError = new Error(
|
|
142
|
-
"Aborted because of self decline: " +
|
|
143
|
-
result.moduleId +
|
|
144
|
-
chainInfo
|
|
145
|
-
);
|
|
146
|
-
break;
|
|
147
|
-
case "declined":
|
|
148
|
-
if (options.onDeclined) options.onDeclined(result);
|
|
149
|
-
if (!options.ignoreDeclined)
|
|
150
|
-
abortError = new Error(
|
|
151
|
-
"Aborted because of declined dependency: " +
|
|
152
|
-
result.moduleId +
|
|
153
|
-
" in " +
|
|
154
|
-
result.parentId +
|
|
155
|
-
chainInfo
|
|
156
|
-
);
|
|
157
|
-
break;
|
|
158
|
-
case "unaccepted":
|
|
159
|
-
if (options.onUnaccepted) options.onUnaccepted(result);
|
|
160
|
-
if (!options.ignoreUnaccepted)
|
|
161
|
-
abortError = new Error(
|
|
162
|
-
"Aborted because " + moduleId + " is not accepted" + chainInfo
|
|
163
|
-
);
|
|
164
|
-
break;
|
|
165
|
-
case "accepted":
|
|
166
|
-
if (options.onAccepted) options.onAccepted(result);
|
|
167
|
-
doApply = true;
|
|
168
|
-
break;
|
|
169
|
-
case "disposed":
|
|
170
|
-
if (options.onDisposed) options.onDisposed(result);
|
|
171
|
-
doDispose = true;
|
|
172
|
-
break;
|
|
173
|
-
default:
|
|
174
|
-
throw new Error("Unexception type " + result.type);
|
|
175
|
-
}
|
|
176
|
-
if (abortError) {
|
|
177
|
-
return {
|
|
178
|
-
error: abortError
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
if (doApply) {
|
|
182
|
-
appliedUpdate[moduleId] = newModuleFactory;
|
|
183
|
-
addAllToSet(outdatedModules, result.outdatedModules);
|
|
184
|
-
for (moduleId in result.outdatedDependencies) {
|
|
185
|
-
if ($hasOwnProperty$(result.outdatedDependencies, moduleId)) {
|
|
186
|
-
if (!outdatedDependencies[moduleId])
|
|
187
|
-
outdatedDependencies[moduleId] = [];
|
|
188
|
-
addAllToSet(
|
|
189
|
-
outdatedDependencies[moduleId],
|
|
190
|
-
result.outdatedDependencies[moduleId]
|
|
191
|
-
);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
if (doDispose) {
|
|
196
|
-
addAllToSet(outdatedModules, [result.moduleId]);
|
|
197
|
-
appliedUpdate[moduleId] = warnUnexpectedRequire;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
currentUpdate = undefined;
|
|
202
|
-
|
|
203
|
-
// Store self accepted outdated modules to require them later by the module system
|
|
204
|
-
var outdatedSelfAcceptedModules = [];
|
|
205
|
-
for (var j = 0; j < outdatedModules.length; j++) {
|
|
206
|
-
var outdatedModuleId = outdatedModules[j];
|
|
207
|
-
var module = $moduleCache$[outdatedModuleId];
|
|
208
|
-
if (
|
|
209
|
-
module &&
|
|
210
|
-
(module.hot._selfAccepted || module.hot._main) &&
|
|
211
|
-
// removed self-accepted modules should not be required
|
|
212
|
-
appliedUpdate[outdatedModuleId] !== warnUnexpectedRequire &&
|
|
213
|
-
// when called invalidate self-accepting is not possible
|
|
214
|
-
!module.hot._selfInvalidated
|
|
215
|
-
) {
|
|
216
|
-
outdatedSelfAcceptedModules.push({
|
|
217
|
-
module: outdatedModuleId,
|
|
218
|
-
require: module.hot._requireSelf,
|
|
219
|
-
errorHandler: module.hot._selfAccepted
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
var moduleOutdatedDependencies;
|
|
225
|
-
|
|
226
|
-
return {
|
|
227
|
-
dispose: function () {
|
|
228
|
-
currentUpdateRemovedChunks.forEach(function (chunkId) {
|
|
229
|
-
delete $installedChunks$[chunkId];
|
|
230
|
-
});
|
|
231
|
-
currentUpdateRemovedChunks = undefined;
|
|
232
|
-
|
|
233
|
-
var idx;
|
|
234
|
-
var queue = outdatedModules.slice();
|
|
235
|
-
while (queue.length > 0) {
|
|
236
|
-
var moduleId = queue.pop();
|
|
237
|
-
var module = $moduleCache$[moduleId];
|
|
238
|
-
if (!module) continue;
|
|
239
|
-
|
|
240
|
-
var data = {};
|
|
241
|
-
|
|
242
|
-
// Call dispose handlers
|
|
243
|
-
var disposeHandlers = module.hot._disposeHandlers;
|
|
244
|
-
for (j = 0; j < disposeHandlers.length; j++) {
|
|
245
|
-
disposeHandlers[j].call(null, data);
|
|
246
|
-
}
|
|
247
|
-
$hmrModuleData$[moduleId] = data;
|
|
248
|
-
|
|
249
|
-
// disable module (this disables requires from this module)
|
|
250
|
-
module.hot.active = false;
|
|
251
|
-
|
|
252
|
-
// remove module from cache
|
|
253
|
-
delete $moduleCache$[moduleId];
|
|
254
|
-
|
|
255
|
-
// when disposing there is no need to call dispose handler
|
|
256
|
-
delete outdatedDependencies[moduleId];
|
|
257
|
-
|
|
258
|
-
// remove "parents" references from all children
|
|
259
|
-
for (j = 0; j < module.children.length; j++) {
|
|
260
|
-
var child = $moduleCache$[module.children[j]];
|
|
261
|
-
if (!child) continue;
|
|
262
|
-
idx = child.parents.indexOf(moduleId);
|
|
263
|
-
if (idx >= 0) {
|
|
264
|
-
child.parents.splice(idx, 1);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// remove outdated dependency from module children
|
|
270
|
-
var dependency;
|
|
271
|
-
for (var outdatedModuleId in outdatedDependencies) {
|
|
272
|
-
if ($hasOwnProperty$(outdatedDependencies, outdatedModuleId)) {
|
|
273
|
-
module = $moduleCache$[outdatedModuleId];
|
|
274
|
-
if (module) {
|
|
275
|
-
moduleOutdatedDependencies =
|
|
276
|
-
outdatedDependencies[outdatedModuleId];
|
|
277
|
-
for (j = 0; j < moduleOutdatedDependencies.length; j++) {
|
|
278
|
-
dependency = moduleOutdatedDependencies[j];
|
|
279
|
-
idx = module.children.indexOf(dependency);
|
|
280
|
-
if (idx >= 0) module.children.splice(idx, 1);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
},
|
|
286
|
-
apply: function (reportError) {
|
|
287
|
-
// insert new code
|
|
288
|
-
for (var updateModuleId in appliedUpdate) {
|
|
289
|
-
if ($hasOwnProperty$(appliedUpdate, updateModuleId)) {
|
|
290
|
-
$moduleFactories$[updateModuleId] = appliedUpdate[updateModuleId];
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
// run new runtime modules
|
|
295
|
-
for (var i = 0; i < currentUpdateRuntime.length; i++) {
|
|
296
|
-
currentUpdateRuntime[i](__webpack_require__);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
// call accept handlers
|
|
300
|
-
for (var outdatedModuleId in outdatedDependencies) {
|
|
301
|
-
if ($hasOwnProperty$(outdatedDependencies, outdatedModuleId)) {
|
|
302
|
-
var module = $moduleCache$[outdatedModuleId];
|
|
303
|
-
if (module) {
|
|
304
|
-
moduleOutdatedDependencies =
|
|
305
|
-
outdatedDependencies[outdatedModuleId];
|
|
306
|
-
var callbacks = [];
|
|
307
|
-
var errorHandlers = [];
|
|
308
|
-
var dependenciesForCallbacks = [];
|
|
309
|
-
for (var j = 0; j < moduleOutdatedDependencies.length; j++) {
|
|
310
|
-
var dependency = moduleOutdatedDependencies[j];
|
|
311
|
-
var acceptCallback =
|
|
312
|
-
module.hot._acceptedDependencies[dependency];
|
|
313
|
-
var errorHandler =
|
|
314
|
-
module.hot._acceptedErrorHandlers[dependency];
|
|
315
|
-
if (acceptCallback) {
|
|
316
|
-
if (callbacks.indexOf(acceptCallback) !== -1) continue;
|
|
317
|
-
callbacks.push(acceptCallback);
|
|
318
|
-
errorHandlers.push(errorHandler);
|
|
319
|
-
dependenciesForCallbacks.push(dependency);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
for (var k = 0; k < callbacks.length; k++) {
|
|
323
|
-
try {
|
|
324
|
-
callbacks[k].call(null, moduleOutdatedDependencies);
|
|
325
|
-
} catch (err) {
|
|
326
|
-
if (typeof errorHandlers[k] === "function") {
|
|
327
|
-
try {
|
|
328
|
-
errorHandlers[k](err, {
|
|
329
|
-
moduleId: outdatedModuleId,
|
|
330
|
-
dependencyId: dependenciesForCallbacks[k]
|
|
331
|
-
});
|
|
332
|
-
} catch (err2) {
|
|
333
|
-
if (options.onErrored) {
|
|
334
|
-
options.onErrored({
|
|
335
|
-
type: "accept-error-handler-errored",
|
|
336
|
-
moduleId: outdatedModuleId,
|
|
337
|
-
dependencyId: dependenciesForCallbacks[k],
|
|
338
|
-
error: err2,
|
|
339
|
-
originalError: err
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
if (!options.ignoreErrored) {
|
|
343
|
-
reportError(err2);
|
|
344
|
-
reportError(err);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
} else {
|
|
348
|
-
if (options.onErrored) {
|
|
349
|
-
options.onErrored({
|
|
350
|
-
type: "accept-errored",
|
|
351
|
-
moduleId: outdatedModuleId,
|
|
352
|
-
dependencyId: dependenciesForCallbacks[k],
|
|
353
|
-
error: err
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
if (!options.ignoreErrored) {
|
|
357
|
-
reportError(err);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
// Load self accepted modules
|
|
367
|
-
for (var o = 0; o < outdatedSelfAcceptedModules.length; o++) {
|
|
368
|
-
var item = outdatedSelfAcceptedModules[o];
|
|
369
|
-
var moduleId = item.module;
|
|
370
|
-
try {
|
|
371
|
-
item.require(moduleId);
|
|
372
|
-
} catch (err) {
|
|
373
|
-
if (typeof item.errorHandler === "function") {
|
|
374
|
-
try {
|
|
375
|
-
item.errorHandler(err, {
|
|
376
|
-
moduleId: moduleId,
|
|
377
|
-
module: $moduleCache$[moduleId]
|
|
378
|
-
});
|
|
379
|
-
} catch (err2) {
|
|
380
|
-
if (options.onErrored) {
|
|
381
|
-
options.onErrored({
|
|
382
|
-
type: "self-accept-error-handler-errored",
|
|
383
|
-
moduleId: moduleId,
|
|
384
|
-
error: err2,
|
|
385
|
-
originalError: err
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
if (!options.ignoreErrored) {
|
|
389
|
-
reportError(err2);
|
|
390
|
-
reportError(err);
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
} else {
|
|
394
|
-
if (options.onErrored) {
|
|
395
|
-
options.onErrored({
|
|
396
|
-
type: "self-accept-errored",
|
|
397
|
-
moduleId: moduleId,
|
|
398
|
-
error: err
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
|
-
if (!options.ignoreErrored) {
|
|
402
|
-
reportError(err);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
return outdatedModules;
|
|
409
|
-
}
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
$hmrInvalidateModuleHandlers$.$key$ = function (moduleId, applyHandlers) {
|
|
413
|
-
if (!currentUpdate) {
|
|
414
|
-
currentUpdate = {};
|
|
415
|
-
currentUpdateRuntime = [];
|
|
416
|
-
currentUpdateRemovedChunks = [];
|
|
417
|
-
applyHandlers.push(applyHandler);
|
|
418
|
-
}
|
|
419
|
-
if (!$hasOwnProperty$(currentUpdate, moduleId)) {
|
|
420
|
-
currentUpdate[moduleId] = $moduleFactories$[moduleId];
|
|
421
|
-
}
|
|
422
|
-
};
|
|
423
|
-
$hmrDownloadUpdateHandlers$.$key$ = function (
|
|
424
|
-
chunkIds,
|
|
425
|
-
removedChunks,
|
|
426
|
-
removedModules,
|
|
427
|
-
promises,
|
|
428
|
-
applyHandlers,
|
|
429
|
-
updatedModulesList
|
|
430
|
-
) {
|
|
431
|
-
applyHandlers.push(applyHandler);
|
|
432
|
-
currentUpdateChunks = {};
|
|
433
|
-
currentUpdateRemovedChunks = removedChunks;
|
|
434
|
-
currentUpdate = removedModules.reduce(function (obj, key) {
|
|
435
|
-
obj[key] = false;
|
|
436
|
-
return obj;
|
|
437
|
-
}, {});
|
|
438
|
-
currentUpdateRuntime = [];
|
|
439
|
-
chunkIds.forEach(function (chunkId) {
|
|
440
|
-
if (
|
|
441
|
-
$hasOwnProperty$($installedChunks$, chunkId) &&
|
|
442
|
-
$installedChunks$[chunkId] !== undefined
|
|
443
|
-
) {
|
|
444
|
-
promises.push($loadUpdateChunk$(chunkId, updatedModulesList));
|
|
445
|
-
currentUpdateChunks[chunkId] = true;
|
|
446
|
-
} else {
|
|
447
|
-
currentUpdateChunks[chunkId] = false;
|
|
448
|
-
}
|
|
449
|
-
});
|
|
450
|
-
if ($ensureChunkHandlers$) {
|
|
451
|
-
$ensureChunkHandlers$.$key$Hmr = function (chunkId, promises) {
|
|
452
|
-
if (
|
|
453
|
-
currentUpdateChunks &&
|
|
454
|
-
$hasOwnProperty$(currentUpdateChunks, chunkId) &&
|
|
455
|
-
!currentUpdateChunks[chunkId]
|
|
456
|
-
) {
|
|
457
|
-
promises.push($loadUpdateChunk$(chunkId));
|
|
458
|
-
currentUpdateChunks[chunkId] = true;
|
|
459
|
-
}
|
|
460
|
-
};
|
|
461
|
-
}
|
|
462
|
-
};
|
|
463
|
-
};
|
|
1
|
+
module.exports = require('./').JavascriptHotModuleReplacementRuntime;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').JavascriptModulesPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').LazySet;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').Module;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').ModuleDependency;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').ModuleFactory;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').ModuleFederationPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').ModuleNotFoundError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').NodeEnvironmentPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').ObjectMiddleware;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').ResolverFactory;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').SortableSet;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').StartupChunkDependenciesPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').StaticExportsDependency;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').TemplatedPathPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').WebpackError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').comparators;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').compileBooleanMatcher;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').createSchemaValidation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./').createHash;
|