@module-federation/webpack-bundler-runtime 1.0.0-canary.1 → 1.0.0-canary.2
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/index.cjs.js +109 -114
- package/index.esm.js +109 -114
- package/package.json +2 -2
package/index.cjs.js
CHANGED
|
@@ -296,18 +296,18 @@ function isPlainObject(val) {
|
|
|
296
296
|
}
|
|
297
297
|
function isStaticResourcesEqual(url1, url2) {
|
|
298
298
|
var REG_EXP = /^(https?:)?\/\//i;
|
|
299
|
-
//
|
|
299
|
+
// Transform url1 and url2 into relative paths
|
|
300
300
|
var relativeUrl1 = url1.replace(REG_EXP, "").replace(/\/$/, "");
|
|
301
301
|
var relativeUrl2 = url2.replace(REG_EXP, "").replace(/\/$/, "");
|
|
302
|
-
//
|
|
302
|
+
// Check if the relative paths are identical
|
|
303
303
|
return relativeUrl1 === relativeUrl2;
|
|
304
304
|
}
|
|
305
305
|
var _nativeGlobal___FEDERATION__, _nativeGlobal___FEDERATION__1, _nativeGlobal___FEDERATION__2, _nativeGlobal___FEDERATION__3, _nativeGlobal___FEDERATION__4, _nativeGlobal___FEDERATION__5, _nativeGlobal___FEDERATION__6;
|
|
306
306
|
// export const nativeGlobal: typeof global = new Function('return this')();
|
|
307
307
|
var nativeGlobal = new Function("return this")();
|
|
308
|
-
//
|
|
309
|
-
// The sandbox in the
|
|
310
|
-
// If no loading content
|
|
308
|
+
// This section is to prevent encapsulation by certain microfrontend frameworks. Due to reuse policies, sandbox escapes.
|
|
309
|
+
// The sandbox in the microfrontend does not replicate the value of 'configurable'.
|
|
310
|
+
// If there is no loading content on the global object, this section defines the loading object.
|
|
311
311
|
if (!Object.hasOwnProperty.call(globalThis, "__GLOBAL_LOADING_REMOTE_ENTRY__")) {
|
|
312
312
|
Object.defineProperty(globalThis, "__GLOBAL_LOADING_REMOTE_ENTRY__", {
|
|
313
313
|
value: {},
|
|
@@ -374,23 +374,15 @@ function getGlobalFederationConstructor() {
|
|
|
374
374
|
function setGlobalFederationConstructor(FederationConstructor) {
|
|
375
375
|
if (isDebugMode$1()) {
|
|
376
376
|
Global.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
|
|
377
|
-
Global.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "1.0.0-canary.
|
|
377
|
+
Global.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "1.0.0-canary.3";
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
381
381
|
function getInfoWithoutType(target, key, getModuleInfoHook) {
|
|
382
|
-
var res
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
key: key
|
|
387
|
-
};
|
|
388
|
-
} else {
|
|
389
|
-
res = {
|
|
390
|
-
value: undefined,
|
|
391
|
-
key: key
|
|
392
|
-
};
|
|
393
|
-
}
|
|
382
|
+
var res = {
|
|
383
|
+
value: target[key],
|
|
384
|
+
key: key
|
|
385
|
+
};
|
|
394
386
|
if (getModuleInfoHook) {
|
|
395
387
|
var hookRes = getModuleInfoHook(target, key);
|
|
396
388
|
res = hookRes || res;
|
|
@@ -401,18 +393,17 @@ var getGlobalSnapshot = function() {
|
|
|
401
393
|
return Global.__FEDERATION__.moduleInfo;
|
|
402
394
|
};
|
|
403
395
|
var getTargetSnapshotInfoByModuleInfo = function(moduleInfo, snapshot, getModuleInfoHook) {
|
|
404
|
-
// remote
|
|
396
|
+
// Check if the remote is included in the hostSnapshot
|
|
405
397
|
var moduleKey = getFMId(moduleInfo);
|
|
406
398
|
var getModuleInfo = getInfoWithoutType(snapshot, moduleKey, getModuleInfoHook).value;
|
|
407
|
-
// remoteSnapshot
|
|
399
|
+
// The remoteSnapshot might not include a version
|
|
408
400
|
if (getModuleInfo && !getModuleInfo.version && "version" in moduleInfo && moduleInfo["version"]) {
|
|
409
401
|
getModuleInfo.version = moduleInfo["version"];
|
|
410
402
|
}
|
|
411
403
|
if (getModuleInfo) {
|
|
412
404
|
return getModuleInfo;
|
|
413
405
|
}
|
|
414
|
-
// remote
|
|
415
|
-
// deploy micro app snapshot
|
|
406
|
+
// If the remote is not included in the hostSnapshot, deploy a micro app snapshot
|
|
416
407
|
if ("version" in moduleInfo && moduleInfo["version"]) {
|
|
417
408
|
var version = moduleInfo.version, resModuleInfo = _object_without_properties_loose(moduleInfo, [
|
|
418
409
|
"version"
|
|
@@ -441,7 +432,10 @@ var getRemoteEntryExports = function(name, globalName) {
|
|
|
441
432
|
entryExports: entryExports
|
|
442
433
|
};
|
|
443
434
|
};
|
|
444
|
-
// global
|
|
435
|
+
// This function is used to register global plugins.
|
|
436
|
+
// It iterates over the provided plugins and checks if they are already registered.
|
|
437
|
+
// If a plugin is not registered, it is added to the global plugins.
|
|
438
|
+
// If a plugin is already registered, a warning message is logged.
|
|
445
439
|
var registerGlobalPlugins = function(plugins) {
|
|
446
440
|
var __GLOBAL_PLUGIN__ = Global.__FEDERATION__.__GLOBAL_PLUGIN__;
|
|
447
441
|
plugins.forEach(function(plugin) {
|
|
@@ -913,8 +907,8 @@ function findSingletonVersionOrderByLoaded(scope, pkgName) {
|
|
|
913
907
|
};
|
|
914
908
|
return findVersion(scope, pkgName, callback);
|
|
915
909
|
}
|
|
916
|
-
//
|
|
917
|
-
// TODO:
|
|
910
|
+
// Details about shared resources
|
|
911
|
+
// TODO: Implement strictVersion for alignment with module federation.
|
|
918
912
|
function getGlobalShare(pkgName, shareInfo) {
|
|
919
913
|
var globalShares = Global.__FEDERATION__.__SHARE__;
|
|
920
914
|
var shareConfig = shareInfo.shareConfig, _shareInfo_scope = shareInfo.scope, scope = _shareInfo_scope === void 0 ? DEFAULT_SCOPE : _shareInfo_scope, strategy = shareInfo.strategy;
|
|
@@ -932,7 +926,7 @@ function getGlobalShare(pkgName, shareInfo) {
|
|
|
932
926
|
var singletonVersion = strategy === "loaded-first" ? findSingletonVersionOrderByLoaded(sc, pkgName) : findSingletonVersionOrderByVersion(sc, pkgName);
|
|
933
927
|
// eslint-disable-next-line max-depth
|
|
934
928
|
if (typeof requiredVersion === "string" && !satisfy(singletonVersion, requiredVersion)) {
|
|
935
|
-
warn("
|
|
929
|
+
warn("Version ".concat(singletonVersion, " from ").concat(singletonVersion && globalShares[sc][pkgName][singletonVersion].from, " of shared singleton module ").concat(pkgName, " does not satisfy the requirement of ").concat(shareInfo.from, " which needs ").concat(requiredVersion, ")"));
|
|
936
930
|
}
|
|
937
931
|
return globalShares[sc][pkgName][singletonVersion];
|
|
938
932
|
} else {
|
|
@@ -1245,6 +1239,7 @@ function _ts_generator(thisArg, body) {
|
|
|
1245
1239
|
};
|
|
1246
1240
|
}
|
|
1247
1241
|
}
|
|
1242
|
+
// Function to get the URL of a resource
|
|
1248
1243
|
function getResourceUrl(module, sourceUrl) {
|
|
1249
1244
|
if ("getPublicPath" in module) {
|
|
1250
1245
|
var publicPath = new Function(module.getPublicPath)();
|
|
@@ -1252,10 +1247,11 @@ function getResourceUrl(module, sourceUrl) {
|
|
|
1252
1247
|
} else if ("publicPath" in module) {
|
|
1253
1248
|
return "".concat(module.publicPath).concat(sourceUrl);
|
|
1254
1249
|
} else {
|
|
1255
|
-
console.warn("
|
|
1250
|
+
console.warn("Unable to retrieve resource URL. If in debug mode, this warning can be disregarded.", module, sourceUrl);
|
|
1256
1251
|
return "";
|
|
1257
1252
|
}
|
|
1258
1253
|
}
|
|
1254
|
+
// Function to match a remote with its name and expose
|
|
1259
1255
|
// id: pkgName(@federation/app1) + expose(button) = @federation/app1/button
|
|
1260
1256
|
// id: alias(app1) + expose(button) = app1/button
|
|
1261
1257
|
// id: alias(app1/utils) + expose(loadash/sort) = app1/utils/loadash/sort
|
|
@@ -1265,9 +1261,9 @@ function matchRemoteWithNameAndExpose(remotes, id) {
|
|
|
1265
1261
|
for(var _iterator = remotes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1266
1262
|
var remote = _step.value;
|
|
1267
1263
|
// match pkgName
|
|
1268
|
-
var
|
|
1264
|
+
var isNameMatched = id.startsWith(remote.name);
|
|
1269
1265
|
var expose = id.replace(remote.name, "");
|
|
1270
|
-
if (
|
|
1266
|
+
if (isNameMatched) {
|
|
1271
1267
|
if (expose.startsWith("/")) {
|
|
1272
1268
|
var pkgNameOrAlias = remote.name;
|
|
1273
1269
|
expose = ".".concat(expose);
|
|
@@ -1285,9 +1281,9 @@ function matchRemoteWithNameAndExpose(remotes, id) {
|
|
|
1285
1281
|
}
|
|
1286
1282
|
}
|
|
1287
1283
|
// match alias
|
|
1288
|
-
var
|
|
1284
|
+
var isAliasMatched = remote.alias && id.startsWith(remote.alias);
|
|
1289
1285
|
var exposeWithAlias = remote.alias && id.replace(remote.alias, "");
|
|
1290
|
-
if (remote.alias &&
|
|
1286
|
+
if (remote.alias && isAliasMatched) {
|
|
1291
1287
|
if (exposeWithAlias && exposeWithAlias.startsWith("/")) {
|
|
1292
1288
|
var pkgNameOrAlias1 = remote.alias;
|
|
1293
1289
|
exposeWithAlias = ".".concat(exposeWithAlias);
|
|
@@ -1321,17 +1317,18 @@ function matchRemoteWithNameAndExpose(remotes, id) {
|
|
|
1321
1317
|
}
|
|
1322
1318
|
return;
|
|
1323
1319
|
}
|
|
1320
|
+
// Function to match a remote with its name or alias
|
|
1324
1321
|
function matchRemote(remotes, nameOrAlias) {
|
|
1325
1322
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1326
1323
|
try {
|
|
1327
1324
|
for(var _iterator = remotes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1328
1325
|
var remote = _step.value;
|
|
1329
|
-
var
|
|
1330
|
-
if (
|
|
1326
|
+
var isNameMatched = nameOrAlias === remote.name;
|
|
1327
|
+
if (isNameMatched) {
|
|
1331
1328
|
return remote;
|
|
1332
1329
|
}
|
|
1333
|
-
var
|
|
1334
|
-
if (
|
|
1330
|
+
var isAliasMatched = remote.alias && nameOrAlias === remote.alias;
|
|
1331
|
+
if (isAliasMatched) {
|
|
1335
1332
|
return remote;
|
|
1336
1333
|
}
|
|
1337
1334
|
}
|
|
@@ -1352,7 +1349,7 @@ function matchRemote(remotes, nameOrAlias) {
|
|
|
1352
1349
|
return;
|
|
1353
1350
|
}
|
|
1354
1351
|
function createScript(url, cb, attrs, createScriptHook) {
|
|
1355
|
-
//
|
|
1352
|
+
// Retrieve the existing script element by its src attribute
|
|
1356
1353
|
var script = null;
|
|
1357
1354
|
var needAttach = true;
|
|
1358
1355
|
var scripts = document.getElementsByTagName("script");
|
|
@@ -1388,7 +1385,7 @@ function createScript(url, cb, attrs, createScriptHook) {
|
|
|
1388
1385
|
});
|
|
1389
1386
|
}
|
|
1390
1387
|
var onScriptComplete = function(prev, event) {
|
|
1391
|
-
//
|
|
1388
|
+
// Prevent memory leaks in IE.
|
|
1392
1389
|
if (script) {
|
|
1393
1390
|
script.onerror = null;
|
|
1394
1391
|
script.onload = null;
|
|
@@ -1420,7 +1417,7 @@ function loadScript(url, info) {
|
|
|
1420
1417
|
}
|
|
1421
1418
|
function registerPlugins(plugins, hookInstances) {
|
|
1422
1419
|
var globalPlugins = getGlobalHostPlugins();
|
|
1423
|
-
//
|
|
1420
|
+
// Incorporate global plugins
|
|
1424
1421
|
if (globalPlugins.length > 0) {
|
|
1425
1422
|
globalPlugins.forEach(function(plugin) {
|
|
1426
1423
|
if (plugins == null ? void 0 : plugins.find(function(item) {
|
|
@@ -1692,7 +1689,7 @@ var simpleJoinRemoteEntry = function simpleJoinRemoteEntry(rPath, rName) {
|
|
|
1692
1689
|
}
|
|
1693
1690
|
return "".concat(transformedPath, "/").concat(rName);
|
|
1694
1691
|
};
|
|
1695
|
-
//
|
|
1692
|
+
// Priority: overrides > remotes
|
|
1696
1693
|
// eslint-disable-next-line max-lines-per-function
|
|
1697
1694
|
function generateSnapshotFromManifest(manifest) {
|
|
1698
1695
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -1707,13 +1704,13 @@ function generateSnapshotFromManifest(manifest) {
|
|
|
1707
1704
|
};
|
|
1708
1705
|
var overridesKeys = Object.keys(overrides);
|
|
1709
1706
|
var remotesInfo = {};
|
|
1710
|
-
// If remotes are not
|
|
1707
|
+
// If remotes are not provided, only the remotes in the manifest will be read
|
|
1711
1708
|
if (!Object.keys(remotes).length) {
|
|
1712
1709
|
var _manifest_remotes;
|
|
1713
1710
|
remotesInfo = ((_manifest_remotes = manifest.remotes) === null || _manifest_remotes === void 0 ? void 0 : _manifest_remotes.reduce(function(res, next) {
|
|
1714
1711
|
var matchedVersion;
|
|
1715
1712
|
var name1 = next.federationContainerName;
|
|
1716
|
-
// overrides
|
|
1713
|
+
// overrides have higher priority
|
|
1717
1714
|
if (overridesKeys.includes(name1)) {
|
|
1718
1715
|
matchedVersion = overrides[name1];
|
|
1719
1716
|
} else {
|
|
@@ -1729,7 +1726,7 @@ function generateSnapshotFromManifest(manifest) {
|
|
|
1729
1726
|
return res;
|
|
1730
1727
|
}, {})) || {};
|
|
1731
1728
|
}
|
|
1732
|
-
// If remotes (deploy scenario) are specified,
|
|
1729
|
+
// If remotes (deploy scenario) are specified, they need to be traversed again
|
|
1733
1730
|
Object.keys(remotes).forEach(function(key) {
|
|
1734
1731
|
return remotesInfo[key] = {
|
|
1735
1732
|
// overrides will override dependencies
|
|
@@ -1827,7 +1824,7 @@ function _loadEntryScript() {
|
|
|
1827
1824
|
createScriptHook: createScriptHook
|
|
1828
1825
|
}).then(function() {
|
|
1829
1826
|
var _getRemoteEntryExports = getRemoteEntryExports(name1, globalName), remoteEntryKey = _getRemoteEntryExports.remoteEntryKey, entryExports = _getRemoteEntryExports.entryExports;
|
|
1830
|
-
assert(entryExports, "\n
|
|
1827
|
+
assert(entryExports, "\n Unable to use the ".concat(name1, "'s '").concat(entry, "' URL with ").concat(remoteEntryKey, "'s globalName to get remoteEntry exports.\n Possible reasons could be:\n\n 1. '").concat(entry, "' is not the correct URL, or the remoteEntry resource or name is incorrect.\n\n 2. ").concat(remoteEntryKey, " cannot be used to get remoteEntry exports in the window object.\n "));
|
|
1831
1828
|
return entryExports;
|
|
1832
1829
|
})
|
|
1833
1830
|
];
|
|
@@ -2115,14 +2112,14 @@ var AsyncHook = /*#__PURE__*/ function(SyncHook) {
|
|
|
2115
2112
|
return AsyncHook;
|
|
2116
2113
|
}(SyncHook);
|
|
2117
2114
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
2118
|
-
function checkReturnData(
|
|
2119
|
-
if (!isObject(
|
|
2115
|
+
function checkReturnData(originalData, returnedData) {
|
|
2116
|
+
if (!isObject(returnedData)) {
|
|
2120
2117
|
return false;
|
|
2121
2118
|
}
|
|
2122
|
-
if (
|
|
2119
|
+
if (originalData !== returnedData) {
|
|
2123
2120
|
// eslint-disable-next-line no-restricted-syntax
|
|
2124
|
-
for(var key in
|
|
2125
|
-
if (!(key in
|
|
2121
|
+
for(var key in originalData){
|
|
2122
|
+
if (!(key in returnedData)) {
|
|
2126
2123
|
return false;
|
|
2127
2124
|
}
|
|
2128
2125
|
}
|
|
@@ -2145,7 +2142,7 @@ var SyncWaterfallHook = /*#__PURE__*/ function(SyncHook) {
|
|
|
2145
2142
|
key: "emit",
|
|
2146
2143
|
value: function emit(data) {
|
|
2147
2144
|
if (!isObject(data)) {
|
|
2148
|
-
error('"'.concat(this.type, '" hook
|
|
2145
|
+
error('The data for the "'.concat(this.type, '" hook should be an object.'));
|
|
2149
2146
|
}
|
|
2150
2147
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
2151
2148
|
try {
|
|
@@ -2156,7 +2153,7 @@ var SyncWaterfallHook = /*#__PURE__*/ function(SyncHook) {
|
|
|
2156
2153
|
if (checkReturnData(data, tempData)) {
|
|
2157
2154
|
data = tempData;
|
|
2158
2155
|
} else {
|
|
2159
|
-
this.onerror('
|
|
2156
|
+
this.onerror('A plugin returned an unacceptable value for the "'.concat(this.type, '" type.'));
|
|
2160
2157
|
break;
|
|
2161
2158
|
}
|
|
2162
2159
|
} catch (e) {
|
|
@@ -2201,7 +2198,7 @@ var AsyncWaterfallHook = /*#__PURE__*/ function(SyncHook) {
|
|
|
2201
2198
|
value: function emit(data) {
|
|
2202
2199
|
var _this = this;
|
|
2203
2200
|
if (!isObject(data)) {
|
|
2204
|
-
error('"'.concat(this.type, '" hook
|
|
2201
|
+
error('The response data for the "'.concat(this.type, '" hook must be an object.'));
|
|
2205
2202
|
}
|
|
2206
2203
|
var ls = Array.from(this.listeners);
|
|
2207
2204
|
if (ls.length > 0) {
|
|
@@ -2222,7 +2219,7 @@ var AsyncWaterfallHook = /*#__PURE__*/ function(SyncHook) {
|
|
|
2222
2219
|
}
|
|
2223
2220
|
}
|
|
2224
2221
|
} else {
|
|
2225
|
-
_this.onerror('
|
|
2222
|
+
_this.onerror('A plugin returned an incorrect value for the "'.concat(_this.type, '" type.'));
|
|
2226
2223
|
}
|
|
2227
2224
|
return data;
|
|
2228
2225
|
};
|
|
@@ -2246,10 +2243,10 @@ var PluginSystem = /*#__PURE__*/ function() {
|
|
|
2246
2243
|
key: "usePlugin",
|
|
2247
2244
|
value: function usePlugin(plugin) {
|
|
2248
2245
|
var _this = this;
|
|
2249
|
-
assert(isPlainObject(plugin), "
|
|
2250
|
-
// The plugin name is
|
|
2246
|
+
assert(isPlainObject(plugin), "Plugin configuration is invalid.");
|
|
2247
|
+
// The plugin's name is mandatory and must be unique
|
|
2251
2248
|
var pluginName = plugin.name;
|
|
2252
|
-
assert(pluginName, "
|
|
2249
|
+
assert(pluginName, "A name must be provided by the plugin.");
|
|
2253
2250
|
if (!this.registerPlugins[pluginName]) {
|
|
2254
2251
|
this.registerPlugins[pluginName] = plugin;
|
|
2255
2252
|
Object.keys(this.lifecycle).forEach(function(key) {
|
|
@@ -2265,9 +2262,9 @@ var PluginSystem = /*#__PURE__*/ function() {
|
|
|
2265
2262
|
key: "removePlugin",
|
|
2266
2263
|
value: function removePlugin(pluginName) {
|
|
2267
2264
|
var _this = this;
|
|
2268
|
-
assert(pluginName, "
|
|
2265
|
+
assert(pluginName, "A name is required.");
|
|
2269
2266
|
var plugin = this.registerPlugins[pluginName];
|
|
2270
|
-
assert(plugin, 'plugin "'.concat(pluginName, '" is not registered.'));
|
|
2267
|
+
assert(plugin, 'The plugin "'.concat(pluginName, '" is not registered.'));
|
|
2271
2268
|
Object.keys(plugin).forEach(function(key) {
|
|
2272
2269
|
if (key !== "name") {
|
|
2273
2270
|
_this.lifecycle[key].remove(plugin[key]);
|
|
@@ -2282,11 +2279,11 @@ var PluginSystem = /*#__PURE__*/ function() {
|
|
|
2282
2279
|
var lifecycle = param.lifecycle, registerPlugins = param.registerPlugins;
|
|
2283
2280
|
var _this = this;
|
|
2284
2281
|
Object.keys(lifecycle).forEach(function(hookName) {
|
|
2285
|
-
assert(!_this.lifecycle[hookName], '"'.concat(hookName, '"
|
|
2282
|
+
assert(!_this.lifecycle[hookName], 'The hook "'.concat(hookName, '" has a conflict and cannot be inherited.'));
|
|
2286
2283
|
_this.lifecycle[hookName] = lifecycle[hookName];
|
|
2287
2284
|
});
|
|
2288
2285
|
Object.keys(registerPlugins).forEach(function(pluginName) {
|
|
2289
|
-
assert(!_this.registerPlugins[pluginName], '"'.concat(pluginName, '"
|
|
2286
|
+
assert(!_this.registerPlugins[pluginName], 'The plugin "'.concat(pluginName, '" has a conflict and cannot be inherited.'));
|
|
2290
2287
|
_this.usePlugin(registerPlugins[pluginName]);
|
|
2291
2288
|
});
|
|
2292
2289
|
}
|
|
@@ -2302,13 +2299,12 @@ function defaultPreloadArgs(preloadConfig) {
|
|
|
2302
2299
|
}, preloadConfig);
|
|
2303
2300
|
}
|
|
2304
2301
|
function formatPreloadArgs(remotes, preloadArgs) {
|
|
2305
|
-
// let preloadOps: PreloadOptions;
|
|
2306
2302
|
return preloadArgs.map(function(args) {
|
|
2307
2303
|
var remoteInfo = matchRemote(remotes, args.nameOrAlias);
|
|
2308
|
-
assert(remoteInfo, "
|
|
2304
|
+
assert(remoteInfo, "Unable to preload ".concat(args.nameOrAlias, " as it is not included in ").concat(!remoteInfo && safeToString$1({
|
|
2309
2305
|
remoteInfo: remoteInfo,
|
|
2310
2306
|
remotes: remotes
|
|
2311
|
-
})
|
|
2307
|
+
})));
|
|
2312
2308
|
return {
|
|
2313
2309
|
remote: remoteInfo,
|
|
2314
2310
|
preloadConfig: defaultPreloadArgs(args)
|
|
@@ -2393,7 +2389,7 @@ function preloadAssets(remoteInfo, host, assets) {
|
|
|
2393
2389
|
}
|
|
2394
2390
|
function assignRemoteInfo(remoteInfo, remoteSnapshot) {
|
|
2395
2391
|
if (!("remoteEntry" in remoteSnapshot) || !remoteSnapshot.remoteEntry) {
|
|
2396
|
-
error("The remoteEntry
|
|
2392
|
+
error("The attribute remoteEntry of ".concat(name, " must not be undefined."));
|
|
2397
2393
|
}
|
|
2398
2394
|
var remoteEntry = remoteSnapshot.remoteEntry;
|
|
2399
2395
|
var entryUrl = getResourceUrl(remoteSnapshot, remoteEntry);
|
|
@@ -2424,7 +2420,7 @@ function snapshotPlugin() {
|
|
|
2424
2420
|
case 1:
|
|
2425
2421
|
_ref = _state.sent(), remoteSnapshot = _ref.remoteSnapshot, globalSnapshot = _ref.globalSnapshot;
|
|
2426
2422
|
assignRemoteInfo(remoteInfo, remoteSnapshot);
|
|
2427
|
-
//
|
|
2423
|
+
// preloading assets
|
|
2428
2424
|
preloadOptions = {
|
|
2429
2425
|
remote: remote,
|
|
2430
2426
|
preloadConfig: {
|
|
@@ -2486,16 +2482,16 @@ function splitId(id) {
|
|
|
2486
2482
|
};
|
|
2487
2483
|
}
|
|
2488
2484
|
}
|
|
2489
|
-
// Traverse all nodes
|
|
2485
|
+
// Traverse all nodes in moduleInfo and traverse the entire snapshot
|
|
2490
2486
|
function traverseModuleInfo(globalSnapshot, remoteInfo, traverse, isRoot) {
|
|
2491
2487
|
var memo = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {}, remoteSnapshot = arguments.length > 5 ? arguments[5] : void 0, getModuleInfoHook = arguments.length > 6 ? arguments[6] : void 0;
|
|
2492
2488
|
var id = getFMId(remoteInfo);
|
|
2493
2489
|
var _getInfoWithoutType = getInfoWithoutType(globalSnapshot, id, getModuleInfoHook), snapshotValue = _getInfoWithoutType.value;
|
|
2494
|
-
var
|
|
2495
|
-
if (
|
|
2496
|
-
traverse(
|
|
2497
|
-
if (
|
|
2498
|
-
var remoteKeys = Object.keys(
|
|
2490
|
+
var effectiveRemoteSnapshot = remoteSnapshot || snapshotValue;
|
|
2491
|
+
if (effectiveRemoteSnapshot && !isManifestProvider(effectiveRemoteSnapshot)) {
|
|
2492
|
+
traverse(effectiveRemoteSnapshot, remoteInfo, isRoot);
|
|
2493
|
+
if (effectiveRemoteSnapshot.remotesInfo) {
|
|
2494
|
+
var remoteKeys = Object.keys(effectiveRemoteSnapshot.remotesInfo);
|
|
2499
2495
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
2500
2496
|
try {
|
|
2501
2497
|
for(var _iterator = remoteKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
@@ -2505,7 +2501,7 @@ function traverseModuleInfo(globalSnapshot, remoteInfo, traverse, isRoot) {
|
|
|
2505
2501
|
}
|
|
2506
2502
|
memo[key] = true;
|
|
2507
2503
|
var subRemoteInfo = splitId(key);
|
|
2508
|
-
var remoteValue =
|
|
2504
|
+
var remoteValue = effectiveRemoteSnapshot.remotesInfo[key];
|
|
2509
2505
|
traverseModuleInfo(globalSnapshot, {
|
|
2510
2506
|
name: subRemoteInfo.name,
|
|
2511
2507
|
version: remoteValue.matchedVersion
|
|
@@ -2540,7 +2536,7 @@ function generatePreloadAssets(origin, preloadOptions, remote, globalSnapshot, r
|
|
|
2540
2536
|
var depsRemote = rootPreloadConfig.depsRemote;
|
|
2541
2537
|
var memo = {};
|
|
2542
2538
|
traverseModuleInfo(globalSnapshot, remote, function(moduleInfoSnapshot, remoteInfo, isRoot) {
|
|
2543
|
-
var
|
|
2539
|
+
var handleAssets = function handleAssets(assets) {
|
|
2544
2540
|
var assetsRes = assets.map(function(asset) {
|
|
2545
2541
|
return getResourceUrl(moduleInfoSnapshot, asset);
|
|
2546
2542
|
});
|
|
@@ -2601,7 +2597,6 @@ function generatePreloadAssets(origin, preloadOptions, remote, globalSnapshot, r
|
|
|
2601
2597
|
var assetsLength = moduleAssetsInfo.length;
|
|
2602
2598
|
for(var index = 0; index < assetsLength; index++){
|
|
2603
2599
|
var assetsInfo = moduleAssetsInfo[index];
|
|
2604
|
-
// for (const assetsInfo of moduleAssetsInfo) {
|
|
2605
2600
|
var exposeFullPath = "".concat(remoteInfo.name, "/").concat(assetsInfo.moduleName);
|
|
2606
2601
|
var preloaded = getPreloaded(exposeFullPath);
|
|
2607
2602
|
if (preloaded) {
|
|
@@ -2609,15 +2604,15 @@ function generatePreloadAssets(origin, preloadOptions, remote, globalSnapshot, r
|
|
|
2609
2604
|
}
|
|
2610
2605
|
if (preloadConfig.resourceCategory === "all") {
|
|
2611
2606
|
var _cssAssets, _cssAssets1, _jsAssets, _jsAssets1;
|
|
2612
|
-
(_cssAssets = cssAssets).push.apply(_cssAssets, _to_consumable_array(
|
|
2613
|
-
(_cssAssets1 = cssAssets).push.apply(_cssAssets1, _to_consumable_array(
|
|
2614
|
-
(_jsAssets = jsAssets).push.apply(_jsAssets, _to_consumable_array(
|
|
2615
|
-
(_jsAssets1 = jsAssets).push.apply(_jsAssets1, _to_consumable_array(
|
|
2607
|
+
(_cssAssets = cssAssets).push.apply(_cssAssets, _to_consumable_array(handleAssets(assetsInfo.assets.css.async)));
|
|
2608
|
+
(_cssAssets1 = cssAssets).push.apply(_cssAssets1, _to_consumable_array(handleAssets(assetsInfo.assets.css.sync)));
|
|
2609
|
+
(_jsAssets = jsAssets).push.apply(_jsAssets, _to_consumable_array(handleAssets(assetsInfo.assets.js.async)));
|
|
2610
|
+
(_jsAssets1 = jsAssets).push.apply(_jsAssets1, _to_consumable_array(handleAssets(assetsInfo.assets.js.sync)));
|
|
2616
2611
|
// eslint-disable-next-line no-constant-condition
|
|
2617
2612
|
} else if (preloadConfig.resourceCategory = "sync") {
|
|
2618
2613
|
var _cssAssets2, _jsAssets2;
|
|
2619
|
-
(_cssAssets2 = cssAssets).push.apply(_cssAssets2, _to_consumable_array(
|
|
2620
|
-
(_jsAssets2 = jsAssets).push.apply(_jsAssets2, _to_consumable_array(
|
|
2614
|
+
(_cssAssets2 = cssAssets).push.apply(_cssAssets2, _to_consumable_array(handleAssets(assetsInfo.assets.css.sync)));
|
|
2615
|
+
(_jsAssets2 = jsAssets).push.apply(_jsAssets2, _to_consumable_array(handleAssets(assetsInfo.assets.js.sync)));
|
|
2621
2616
|
}
|
|
2622
2617
|
setPreloaded(exposeFullPath);
|
|
2623
2618
|
}
|
|
@@ -2789,10 +2784,8 @@ var SnapshotHandler = /*#__PURE__*/ function() {
|
|
|
2789
2784
|
];
|
|
2790
2785
|
case 1:
|
|
2791
2786
|
_state.sent();
|
|
2792
|
-
// In
|
|
2793
|
-
//
|
|
2794
|
-
// In the dynamic loadRemote scenario, incomplete remotesInfo delivery may occur. In this case, the remotesInfo in the host needs to be completed in the snapshot at runtime.
|
|
2795
|
-
// Ensure the integrity of the snapshot, and at the same time help the chrome plug-in correctly identify all producer modules, ensuring that proxyable producer modules will not be missing
|
|
2787
|
+
// In dynamic loadRemote scenarios, incomplete remotesInfo delivery may occur. In such cases, the remotesInfo in the host needs to be completed in the snapshot at runtime.
|
|
2788
|
+
// This ensures the snapshot's integrity and helps the chrome plugin correctly identify all producer modules, ensuring that proxyable producer modules will not be missing.
|
|
2796
2789
|
if (hostSnapshot && "remotesInfo" in hostSnapshot && !getInfoWithoutType(hostSnapshot.remotesInfo, moduleInfo.name, function(target, key) {
|
|
2797
2790
|
var res = _this.HostInstance.loaderHook.lifecycle.getModuleInfo.emit({
|
|
2798
2791
|
target: target,
|
|
@@ -3024,7 +3017,7 @@ var SnapshotHandler = /*#__PURE__*/ function() {
|
|
|
3024
3017
|
];
|
|
3025
3018
|
case 3:
|
|
3026
3019
|
manifestJson = _state.sent();
|
|
3027
|
-
assert(manifestJson.metaData && manifestJson.exposes && manifestJson.shared, "".concat(manifestUrl, " is not federation manifest"));
|
|
3020
|
+
assert(manifestJson.metaData && manifestJson.exposes && manifestJson.shared, "".concat(manifestUrl, " is not a federation manifest"));
|
|
3028
3021
|
_this.manifestCache.set(manifestUrl, manifestJson);
|
|
3029
3022
|
return [
|
|
3030
3023
|
2,
|
|
@@ -3119,7 +3112,7 @@ var FederationHost = /*#__PURE__*/ function() {
|
|
|
3119
3112
|
generatePreloadAssets: new AsyncHook("generatePreloadAssets"),
|
|
3120
3113
|
afterPreloadRemote: new AsyncHook()
|
|
3121
3114
|
});
|
|
3122
|
-
this.version = "1.0.0-canary.
|
|
3115
|
+
this.version = "1.0.0-canary.3";
|
|
3123
3116
|
this.moduleCache = new Map();
|
|
3124
3117
|
this.loaderHook = new PluginSystem({
|
|
3125
3118
|
// FIXME: may not be suitable
|
|
@@ -3127,8 +3120,8 @@ var FederationHost = /*#__PURE__*/ function() {
|
|
|
3127
3120
|
createScript: new SyncHook()
|
|
3128
3121
|
});
|
|
3129
3122
|
this.loadingShare = {};
|
|
3130
|
-
// TODO:
|
|
3131
|
-
//
|
|
3123
|
+
// TODO: Validate the details of the options
|
|
3124
|
+
// Initialize options with default values
|
|
3132
3125
|
var defaultOptions = {
|
|
3133
3126
|
id: getBuilderId(),
|
|
3134
3127
|
name: userOptions.name,
|
|
@@ -3166,9 +3159,10 @@ var FederationHost = /*#__PURE__*/ function() {
|
|
|
3166
3159
|
return _ts_generator(this, function(_state) {
|
|
3167
3160
|
switch(_state.label){
|
|
3168
3161
|
case 0:
|
|
3169
|
-
//
|
|
3170
|
-
//
|
|
3171
|
-
//
|
|
3162
|
+
// This function performs the following steps:
|
|
3163
|
+
// 1. Checks if the currently loaded share already exists, if not, it throws an error
|
|
3164
|
+
// 2. Searches globally for a matching share, if found, it uses it directly
|
|
3165
|
+
// 3. If not found, it retrieves it from the current share and stores the obtained share globally.
|
|
3172
3166
|
shareInfo = Object.assign({}, (_this_options_shared = _this.options.shared) == null ? void 0 : _this_options_shared[pkgName], customShareInfo);
|
|
3173
3167
|
return [
|
|
3174
3168
|
4,
|
|
@@ -3182,8 +3176,9 @@ var FederationHost = /*#__PURE__*/ function() {
|
|
|
3182
3176
|
case 1:
|
|
3183
3177
|
loadShareRes = _state.sent();
|
|
3184
3178
|
shareInfoRes = loadShareRes.shareInfo;
|
|
3185
|
-
|
|
3186
|
-
|
|
3179
|
+
// Assert that shareInfoRes exists, if not, throw an error
|
|
3180
|
+
assert(shareInfoRes, "Cannot find ".concat(pkgName, " Share in the ").concat(_this.options.name, ". Please ensure that the ").concat(pkgName, " Share parameters have been injected"));
|
|
3181
|
+
// Retrieve from cache
|
|
3187
3182
|
globalShare = getGlobalShare(pkgName, shareInfoRes);
|
|
3188
3183
|
if (!(globalShare && globalShare.lib)) return [
|
|
3189
3184
|
3,
|
|
@@ -3314,10 +3309,10 @@ var FederationHost = /*#__PURE__*/ function() {
|
|
|
3314
3309
|
}
|
|
3315
3310
|
},
|
|
3316
3311
|
{
|
|
3317
|
-
//
|
|
3318
|
-
// 1. If the loaded shared already exists globally, then
|
|
3319
|
-
// 2. If lib exists in local shared,
|
|
3320
|
-
// 3. If the local get returns something other than Promise, then
|
|
3312
|
+
// The lib function will only be available if the shared set by eager or runtime init is set or the shared is successfully loaded.
|
|
3313
|
+
// 1. If the loaded shared already exists globally, then it will be reused
|
|
3314
|
+
// 2. If lib exists in local shared, it will be used directly
|
|
3315
|
+
// 3. If the local get returns something other than Promise, then it will be used directly
|
|
3321
3316
|
key: "loadShareSync",
|
|
3322
3317
|
value: function loadShareSync(pkgName) {
|
|
3323
3318
|
var _this_options_shared;
|
|
@@ -3342,7 +3337,7 @@ var FederationHost = /*#__PURE__*/ function() {
|
|
|
3342
3337
|
if (shareInfo.get) {
|
|
3343
3338
|
var module = shareInfo.get();
|
|
3344
3339
|
if (_instanceof(module, Promise)) {
|
|
3345
|
-
throw new Error("\n The loadShareSync function
|
|
3340
|
+
throw new Error("\n The loadShareSync function was unable to load ".concat(pkgName, ". The ").concat(pkgName, " could not be found in ").concat(this.options.name, ".\n Possible reasons for failure: \n\n 1. The ").concat(pkgName, " share was registered with the 'get' attribute, but loadShare was not used beforehand.\n\n 2. The ").concat(pkgName, " share was not registered with the 'lib' attribute.\n\n "));
|
|
3346
3341
|
}
|
|
3347
3342
|
shareInfo.lib = module;
|
|
3348
3343
|
this.setShared({
|
|
@@ -3354,7 +3349,7 @@ var FederationHost = /*#__PURE__*/ function() {
|
|
|
3354
3349
|
});
|
|
3355
3350
|
return shareInfo.lib;
|
|
3356
3351
|
}
|
|
3357
|
-
throw new Error("\n The loadShareSync function
|
|
3352
|
+
throw new Error("\n The loadShareSync function was unable to load ".concat(pkgName, ". The ").concat(pkgName, " could not be found in ").concat(this.options.name, ".\n Possible reasons for failure: \n\n 1. The ").concat(pkgName, " share was registered with the 'get' attribute, but loadShare was not used beforehand.\n\n 2. The ").concat(pkgName, " share was not registered with the 'lib' attribute.\n\n "));
|
|
3358
3353
|
}
|
|
3359
3354
|
},
|
|
3360
3355
|
{
|
|
@@ -3378,7 +3373,7 @@ var FederationHost = /*#__PURE__*/ function() {
|
|
|
3378
3373
|
loadRemoteArgs = _state.sent();
|
|
3379
3374
|
idRes = loadRemoteArgs.id;
|
|
3380
3375
|
remoteSplitInfo = matchRemoteWithNameAndExpose(_this.options.remotes, idRes);
|
|
3381
|
-
assert(remoteSplitInfo, "\n
|
|
3376
|
+
assert(remoteSplitInfo, "\n Unable to locate ".concat(idRes, " in ").concat(_this.options.name, ". Potential reasons for failure include:\n\n 1. ").concat(idRes, " was not included in the 'remotes' parameter of ").concat(_this.options.name, ".\n\n 2. ").concat(idRes, " could not be found in the 'remotes' of ").concat(_this.options.name, " with either 'name' or 'alias' attributes.\n 3. The 'beforeLoadRemote' hook was provided but did not return the correct 'remoteInfo' when attempting to load ").concat(idRes, ".\n "));
|
|
3382
3377
|
rawRemote = remoteSplitInfo.remote;
|
|
3383
3378
|
remoteInfo = getRemoteInfo(rawRemote);
|
|
3384
3379
|
return [
|
|
@@ -3394,7 +3389,7 @@ var FederationHost = /*#__PURE__*/ function() {
|
|
|
3394
3389
|
case 2:
|
|
3395
3390
|
matchInfo = _state.sent();
|
|
3396
3391
|
remote = matchInfo.remote, expose = matchInfo.expose;
|
|
3397
|
-
assert(remote && expose, "The 'beforeLoadRemote' hook was
|
|
3392
|
+
assert(remote && expose, "The 'beforeLoadRemote' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ".concat(idRes, "."));
|
|
3398
3393
|
module = _this.moduleCache.get(remote.name);
|
|
3399
3394
|
moduleOptions = {
|
|
3400
3395
|
hostInfo: {
|
|
@@ -3571,9 +3566,9 @@ var FederationHost = /*#__PURE__*/ function() {
|
|
|
3571
3566
|
},
|
|
3572
3567
|
{
|
|
3573
3568
|
/**
|
|
3574
|
-
*
|
|
3575
|
-
*
|
|
3576
|
-
*
|
|
3569
|
+
* This function initializes the sharing sequence (executed only once per share scope).
|
|
3570
|
+
* It accepts one argument, the name of the share scope.
|
|
3571
|
+
* If the share scope does not exist, it creates one.
|
|
3577
3572
|
*/ // eslint-disable-next-line @typescript-eslint/member-ordering
|
|
3578
3573
|
key: "initializeSharing",
|
|
3579
3574
|
value: function initializeSharing() {
|
|
@@ -3582,15 +3577,15 @@ var FederationHost = /*#__PURE__*/ function() {
|
|
|
3582
3577
|
var shareScopeLoading = Global.__FEDERATION__.__SHARE_SCOPE_LOADING__;
|
|
3583
3578
|
var shareScope = Global.__FEDERATION__.__SHARE__;
|
|
3584
3579
|
var hostName = this.options.name;
|
|
3585
|
-
// only
|
|
3580
|
+
// Executes only once
|
|
3586
3581
|
if (shareScopeLoading[shareScopeName]) {
|
|
3587
3582
|
return shareScopeLoading[shareScopeName];
|
|
3588
3583
|
}
|
|
3589
|
-
//
|
|
3584
|
+
// Creates a new share scope if necessary
|
|
3590
3585
|
if (!shareScope[shareScopeName]) {
|
|
3591
3586
|
shareScope[shareScopeName] = {};
|
|
3592
3587
|
}
|
|
3593
|
-
//
|
|
3588
|
+
// Executes all initialization snippets from all accessible modules
|
|
3594
3589
|
var scope = shareScope[shareScopeName];
|
|
3595
3590
|
var register = function(name1, shared) {
|
|
3596
3591
|
var version = shared.version, eager = shared.eager;
|
|
@@ -3673,8 +3668,8 @@ var FederationHost = /*#__PURE__*/ function() {
|
|
|
3673
3668
|
return item.name === remote.name;
|
|
3674
3669
|
})) {
|
|
3675
3670
|
if (remote.alias) {
|
|
3676
|
-
//
|
|
3677
|
-
//
|
|
3671
|
+
// Validate if alias equals the prefix of remote.name and remote.alias, if so, throw an error
|
|
3672
|
+
// As multi-level path references cannot guarantee unique names, alias being a prefix of remote.name is not supported
|
|
3678
3673
|
var findEqual = res.find(function(item) {
|
|
3679
3674
|
var _item_alias;
|
|
3680
3675
|
return remote.alias && (item.name.startsWith(remote.alias) || ((_item_alias = item.alias) == null ? void 0 : _item_alias.startsWith(remote.alias)));
|
|
@@ -3691,7 +3686,7 @@ var FederationHost = /*#__PURE__*/ function() {
|
|
|
3691
3686
|
remote.shareScope = DEFAULT_SCOPE;
|
|
3692
3687
|
}
|
|
3693
3688
|
if (!remote.type) {
|
|
3694
|
-
// FIXME: The build plugin
|
|
3689
|
+
// FIXME: The build plugin needs to support this field
|
|
3695
3690
|
remote.type = DEFAULT_REMOTE_TYPE;
|
|
3696
3691
|
}
|
|
3697
3692
|
res.push(remote);
|
|
@@ -3979,7 +3974,7 @@ function consumes(options) {
|
|
|
3979
3974
|
try {
|
|
3980
3975
|
var federationInstance = webpackRequire.federation.instance;
|
|
3981
3976
|
if (!federationInstance) {
|
|
3982
|
-
throw new Error("
|
|
3977
|
+
throw new Error("Federation instance not found!");
|
|
3983
3978
|
}
|
|
3984
3979
|
var _moduleToHandlerMapping_id = moduleToHandlerMapping[id], shareKey = _moduleToHandlerMapping_id.shareKey, getter = _moduleToHandlerMapping_id.getter, shareInfo = _moduleToHandlerMapping_id.shareInfo;
|
|
3985
3980
|
var promise = federationInstance.loadShare(shareKey, shareInfo).then(function(factory) {
|
|
@@ -3991,7 +3986,7 @@ function consumes(options) {
|
|
|
3991
3986
|
if (promise.then) {
|
|
3992
3987
|
promises.push(installedModules[id] = promise.then(onFactory).catch(onError));
|
|
3993
3988
|
} else {
|
|
3994
|
-
// @ts-ignore
|
|
3989
|
+
// @ts-ignore maintain previous logic
|
|
3995
3990
|
onFactory(promise);
|
|
3996
3991
|
}
|
|
3997
3992
|
} catch (e) {
|
|
@@ -4009,11 +4004,11 @@ function handleInitialConsumes(options) {
|
|
|
4009
4004
|
var moduleId = options.moduleId, moduleToHandlerMapping = options.moduleToHandlerMapping, webpackRequire = options.webpackRequire;
|
|
4010
4005
|
var federationInstance = webpackRequire.federation.instance;
|
|
4011
4006
|
if (!federationInstance) {
|
|
4012
|
-
throw new Error("
|
|
4007
|
+
throw new Error("Federation instance not found!");
|
|
4013
4008
|
}
|
|
4014
4009
|
var _moduleToHandlerMapping_moduleId = moduleToHandlerMapping[moduleId], shareKey = _moduleToHandlerMapping_moduleId.shareKey, shareInfo = _moduleToHandlerMapping_moduleId.shareInfo;
|
|
4015
4010
|
if (!shareInfo.shareConfig.eager) {
|
|
4016
|
-
throw new Error('
|
|
4011
|
+
throw new Error('Shared: "'.concat(shareKey, '" cannot be loaded synchronously unless "eager:true" is set or async entry is enabled.'));
|
|
4017
4012
|
}
|
|
4018
4013
|
return federationInstance.loadShareSync(shareKey);
|
|
4019
4014
|
}
|
|
@@ -4021,7 +4016,7 @@ function installInitialConsumes(options) {
|
|
|
4021
4016
|
var moduleToHandlerMapping = options.moduleToHandlerMapping, webpackRequire = options.webpackRequire, installedModules = options.installedModules, initialConsumes = options.initialConsumes;
|
|
4022
4017
|
initialConsumes.forEach(function(id) {
|
|
4023
4018
|
webpackRequire.m[id] = function(module) {
|
|
4024
|
-
// Handle
|
|
4019
|
+
// Handle scenario when module is used synchronously
|
|
4025
4020
|
installedModules[id] = 0;
|
|
4026
4021
|
delete webpackRequire.c[id];
|
|
4027
4022
|
var factory = handleInitialConsumes({
|