@module-federation/nextjs-mf 8.1.6 → 8.1.7
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/dist/package.json +3 -3
- package/dist/src/federation-noop.js +1 -1
- package/dist/src/federation-noop.js.map +1 -1
- package/dist/src/plugins/NextFederationPlugin/index.js +7 -0
- package/dist/src/plugins/NextFederationPlugin/index.js.map +1 -1
- package/dist/src/plugins/container/runtimePlugin.js +29 -4
- package/dist/src/plugins/container/runtimePlugin.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/src/default-delegate.d.ts +0 -1
- package/dist/src/default-delegate.js +0 -308
- package/dist/src/default-delegate.js.map +0 -1
- package/dist/src/loaders/delegateLoader.d.ts +0 -10
- package/dist/src/loaders/delegateLoader.js +0 -46
- package/dist/src/loaders/delegateLoader.js.map +0 -1
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/nextjs-mf",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"url": "0.11.3",
|
|
61
61
|
"util": "0.12.5",
|
|
62
62
|
"webpack-sources": "^3.2.3",
|
|
63
|
-
"@module-federation/runtime-tools": "0.0.
|
|
64
|
-
"@module-federation/webpack-bundler-runtime": "0.0.
|
|
63
|
+
"@module-federation/runtime-tools": "0.0.10",
|
|
64
|
+
"@module-federation/webpack-bundler-runtime": "0.0.10"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"next": "^12 || ^13 || ^14",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"federation-noop.js","sourceRoot":"","sources":["../../src/federation-noop.ts"],"names":[],"mappings":";AAAA,OAAO,CAAC,WAAW,CAAC,CAAC;AACrB,OAAO,CAAC,aAAa,CAAC,CAAC;AACvB,OAAO,CAAC,WAAW,CAAC,CAAC;AACrB,OAAO,CAAC,aAAa,CAAC,CAAC;AACvB,OAAO,CAAC,YAAY,CAAC,CAAC;AACtB,OAAO,CAAC,cAAc,CAAC,CAAC;AACxB,OAAO,CAAC,YAAY,CAAC,CAAC;AACtB,OAAO,CAAC,UAAU,CAAC,CAAC;AACpB,OAAO,CAAC,YAAY,CAAC,CAAC;AACtB,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC5B,OAAO,CAAC,YAAY,CAAC,CAAC;AACtB,
|
|
1
|
+
{"version":3,"file":"federation-noop.js","sourceRoot":"","sources":["../../src/federation-noop.ts"],"names":[],"mappings":";AAAA,OAAO,CAAC,WAAW,CAAC,CAAC;AACrB,OAAO,CAAC,aAAa,CAAC,CAAC;AACvB,OAAO,CAAC,WAAW,CAAC,CAAC;AACrB,OAAO,CAAC,aAAa,CAAC,CAAC;AACvB,OAAO,CAAC,YAAY,CAAC,CAAC;AACtB,OAAO,CAAC,cAAc,CAAC,CAAC;AACxB,OAAO,CAAC,YAAY,CAAC,CAAC;AACtB,OAAO,CAAC,UAAU,CAAC,CAAC;AACpB,OAAO,CAAC,YAAY,CAAC,CAAC;AACtB,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC5B,OAAO,CAAC,YAAY,CAAC,CAAC;AACtB,oCAAoC;AACpC,OAAO,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -51,6 +51,13 @@ class NextFederationPlugin {
|
|
|
51
51
|
// ContainerPlugin will get NextFederationPlugin._options, so NextFederationPlugin._options should be the same as normalFederationPluginOptions
|
|
52
52
|
this._options = normalFederationPluginOptions;
|
|
53
53
|
new enhanced_1.ModuleFederationPlugin(normalFederationPluginOptions).apply(compiler);
|
|
54
|
+
const runtimeESMPath = require.resolve('@module-federation/runtime/dist/index.esm.js');
|
|
55
|
+
compiler.hooks.afterPlugins.tap('PatchAliasWebpackPlugin', () => {
|
|
56
|
+
compiler.options.resolve.alias = {
|
|
57
|
+
...compiler.options.resolve.alias,
|
|
58
|
+
'@module-federation/runtime$': runtimeESMPath,
|
|
59
|
+
};
|
|
60
|
+
});
|
|
54
61
|
}
|
|
55
62
|
validateOptions(compiler) {
|
|
56
63
|
const compilerValid = (0, validate_options_1.validateCompilerOptions)(compiler);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/NextFederationPlugin/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,CAAC;;;;;;AAQb,0FAA+E;AAC/E,mFAA2D;AAC3D,uEAAoE;AACpE,qDAAyE;AACzE,+CAA2C;AAC3C,yDAG4B;AAC5B,iEAKgC;AAChC,iEAA4D;AAC5D,0DAAqE;AACrE,gDAAwB;AACxB;;GAEG;AACH,MAAa,oBAAoB;IAI/B;;;;OAIG;IACH,YAAY,OAAoC;QAC9C,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,IAAA,wBAAU,EAAC,OAAO,CAAC,CAAC;QAC1D,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC;QAC5B,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,QAAkB;QACtB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC;YACpC,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC;gBACtC,IAAA,uCAAc,EAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC;YAAE,OAAO;QAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,C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AA2B,CAAC,CAAC;QACtD,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAvID,oDAuIC;AAED,kBAAe,oBAAoB,CAAC"}
|
|
@@ -31,6 +31,8 @@ function default_1() {
|
|
|
31
31
|
beforeInit(args) {
|
|
32
32
|
const { userOptions, shareInfo } = args;
|
|
33
33
|
const { shared } = userOptions;
|
|
34
|
+
if (!globalThis.usedChunks)
|
|
35
|
+
globalThis.usedChunks = new Set();
|
|
34
36
|
if (shared) {
|
|
35
37
|
Object.keys(shared || {}).forEach((sharedKey) => {
|
|
36
38
|
if (!shared[sharedKey].strategy) {
|
|
@@ -44,7 +46,7 @@ function default_1() {
|
|
|
44
46
|
}
|
|
45
47
|
// if (__webpack_runtime_id__ && !__webpack_runtime_id__.startsWith('webpack')) return args;
|
|
46
48
|
const { moduleCache, name } = args.origin;
|
|
47
|
-
const gs =
|
|
49
|
+
const gs = new Function('return globalThis')();
|
|
48
50
|
const attachedRemote = gs[name];
|
|
49
51
|
if (attachedRemote) {
|
|
50
52
|
moduleCache.set(name, attachedRemote);
|
|
@@ -63,9 +65,32 @@ function default_1() {
|
|
|
63
65
|
afterResolve(args) {
|
|
64
66
|
return args;
|
|
65
67
|
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
onLoad(args) {
|
|
69
|
+
const { exposeModuleFactory, exposeModule, id } = args;
|
|
70
|
+
const moduleOrFactory = exposeModuleFactory || exposeModule;
|
|
71
|
+
const exposedModuleExports = moduleOrFactory();
|
|
72
|
+
const handler = {
|
|
73
|
+
//@ts-ignore
|
|
74
|
+
get: function (target, prop, receiver) {
|
|
75
|
+
const origMethod = target[prop];
|
|
76
|
+
if (typeof origMethod === 'function') {
|
|
77
|
+
//@ts-ignore
|
|
78
|
+
return function (...args) {
|
|
79
|
+
globalThis.usedChunks.add(
|
|
80
|
+
//@ts-ignore
|
|
81
|
+
id);
|
|
82
|
+
// console.log(`function as called to ${prop}`, id);
|
|
83
|
+
//@ts-ignore
|
|
84
|
+
return origMethod.apply(this, args);
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return Reflect.get(target, prop, receiver);
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
return () => new Proxy(exposedModuleExports, handler);
|
|
93
|
+
},
|
|
69
94
|
resolveShare(args) {
|
|
70
95
|
if (args.pkgName !== 'react' &&
|
|
71
96
|
args.pkgName !== 'react-dom' &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimePlugin.js","sourceRoot":"","sources":["../../../../src/plugins/container/runtimePlugin.ts"],"names":[],"mappings":";;AAEA;IACE,OAAO;QACL,IAAI,EAAE,sBAAsB;QAC5B,eAAe,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE;YACzC,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;YAC7B,MAAM,EAAE,GAAG;gBACT,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;gBACpC,OAAO,IAAI,CAAC;YACd,CAAC,CAAC;YAEF,EAAE,CAAC,eAAe,GAAG,UAAU,GAAQ;gBACrC,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC;YACF,IAAI,GAAG,CAAC;YACR,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;gBACrB,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC;oBACX,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,EAAE;oBACX,kBAAkB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;iBAC1C,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG;oBACJ,OAAO,EAAE,EAAE;oBACX,kBAAkB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;iBAC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CAAC;YACd,CAAC;YACD,IAAI,CAAC,QAAQ,GAAG;gBACd,aAAa,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,yDAAyD;gBAChI,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;YAChD,CAAC,CAAC;YACF,OAAO,IAAI,CAAC;QACd,CAAC;QACD,KAAK,CAAC,eAAe,CAAC,IAAI;YACxB,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC;AA3HD,4BA2HC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -27,4 +27,4 @@ export type { FlushedChunksProps } from './flushedChunks';
|
|
|
27
27
|
* If the function is called on the server side, it imports the revalidate function from the module federation node utilities and returns the result of calling that function.
|
|
28
28
|
* @returns {Promise<boolean>} A promise that resolves with a boolean.
|
|
29
29
|
*/
|
|
30
|
-
export declare const revalidate: () => Promise<any>;
|
|
30
|
+
export declare const revalidate: (fetchModule?: any, force?: boolean) => Promise<any>;
|
package/dist/utils/index.js
CHANGED
|
@@ -54,14 +54,14 @@ Object.defineProperty(exports, "FlushedChunks", { enumerable: true, get: functio
|
|
|
54
54
|
* If the function is called on the server side, it imports the revalidate function from the module federation node utilities and returns the result of calling that function.
|
|
55
55
|
* @returns {Promise<boolean>} A promise that resolves with a boolean.
|
|
56
56
|
*/
|
|
57
|
-
const revalidate = () => {
|
|
57
|
+
const revalidate = (fetchModule = undefined, force = false) => {
|
|
58
58
|
if (typeof window !== 'undefined') {
|
|
59
59
|
console.error('revalidate should only be called server-side');
|
|
60
60
|
return Promise.resolve(false);
|
|
61
61
|
}
|
|
62
62
|
// @ts-ignore
|
|
63
63
|
return Promise.resolve().then(() => __importStar(require('@module-federation/node/utils'))).then((utils) => {
|
|
64
|
-
return utils.revalidate();
|
|
64
|
+
return utils.revalidate(fetchModule, force);
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
67
|
exports.revalidate = revalidate;
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,0DAAmE;AAA1D,gHAAA,mBAAmB,OAAA;AAE5B;;;GAGG;AACH,0DAA4D;AAAnD,yGAAA,YAAY,OAAA;AAErB;;;GAGG;AACH,aAAa;AACb,uDAA4D;AAAnD,oGAAA,WAAW,OAAA;AAEpB;;GAEG;AACH,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AAOtB;;;;;GAKG;AACI,MAAM,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,0DAAmE;AAA1D,gHAAA,mBAAmB,OAAA;AAE5B;;;GAGG;AACH,0DAA4D;AAAnD,yGAAA,YAAY,OAAA;AAErB;;;GAGG;AACH,aAAa;AACb,uDAA4D;AAAnD,oGAAA,WAAW,OAAA;AAEpB;;GAEG;AACH,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AAOtB;;;;;GAKG;AACI,MAAM,UAAU,GAAG,CACxB,cAAmB,SAAS,EAC5B,QAAiB,KAAK,EACtB,EAAE;IACF,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAC9D,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IACD,aAAa;IACb,OAAO,kDAAO,+BAA+B,IAAE,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5D,OAAO,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAZW,QAAA,UAAU,cAYrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/nextjs-mf",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"webpack-sources": "^3.2.3",
|
|
43
43
|
"eventemitter3": "^5.0.0",
|
|
44
44
|
"@module-federation/utilities": "3.0.5",
|
|
45
|
-
"@module-federation/runtime": "0.0.
|
|
46
|
-
"@module-federation/sdk": "0.0.
|
|
47
|
-
"@module-federation/enhanced": "0.0.
|
|
48
|
-
"@module-federation/node": "2.0.
|
|
45
|
+
"@module-federation/runtime": "0.0.10",
|
|
46
|
+
"@module-federation/sdk": "0.0.10",
|
|
47
|
+
"@module-federation/enhanced": "0.0.10",
|
|
48
|
+
"@module-federation/node": "2.0.8",
|
|
49
49
|
"@module-federation/webpack-type": "0.0.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/**
|
|
4
|
-
* Initializing pure as RemoteVars
|
|
5
|
-
*/
|
|
6
|
-
let pure = {};
|
|
7
|
-
try {
|
|
8
|
-
/**
|
|
9
|
-
* Assigning process.env['REMOTES'] to pure if it exists
|
|
10
|
-
*/
|
|
11
|
-
// @ts-ignore
|
|
12
|
-
pure = process.env['REMOTES'] || {};
|
|
13
|
-
}
|
|
14
|
-
catch (e) {
|
|
15
|
-
// not in webpack bundle
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Casting pure as RemoteVars
|
|
19
|
-
*/
|
|
20
|
-
const remoteVars = pure;
|
|
21
|
-
/**
|
|
22
|
-
* Function to extract URL and Global from a string
|
|
23
|
-
* @param {string} urlAndGlobal - The string to extract from
|
|
24
|
-
* @returns {Array} - An array containing the URL and Global
|
|
25
|
-
*/
|
|
26
|
-
const extractUrlAndGlobal = (urlAndGlobal) => {
|
|
27
|
-
const index = urlAndGlobal.indexOf('@');
|
|
28
|
-
if (index <= 0 || index === urlAndGlobal.length - 1) {
|
|
29
|
-
throw new Error(`Invalid request "${urlAndGlobal}"`);
|
|
30
|
-
}
|
|
31
|
-
return [urlAndGlobal.substring(index + 1), urlAndGlobal.substring(0, index)];
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Function to load script
|
|
35
|
-
* @param {string | RuntimeRemote} keyOrRuntimeRemoteItem - The key or RuntimeRemote item to load
|
|
36
|
-
* @returns {Promise} - A promise that resolves with the loaded script
|
|
37
|
-
*/
|
|
38
|
-
const loadScript = (keyOrRuntimeRemoteItem) => {
|
|
39
|
-
const runtimeRemotes = getRuntimeRemotes();
|
|
40
|
-
// 1) Load remote container if needed
|
|
41
|
-
let asyncContainer;
|
|
42
|
-
const reference = typeof keyOrRuntimeRemoteItem === 'string'
|
|
43
|
-
? runtimeRemotes[keyOrRuntimeRemoteItem]
|
|
44
|
-
: keyOrRuntimeRemoteItem;
|
|
45
|
-
if (reference.asyncContainer) {
|
|
46
|
-
asyncContainer =
|
|
47
|
-
typeof reference.asyncContainer.then === 'function'
|
|
48
|
-
? reference.asyncContainer
|
|
49
|
-
: // @ts-ignore
|
|
50
|
-
reference.asyncContainer();
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
// This casting is just to satisfy typescript,
|
|
54
|
-
// In reality remoteGlobal will always be a string;
|
|
55
|
-
const remoteGlobal = reference.global;
|
|
56
|
-
// Check if theres an override for container key if not use remote global
|
|
57
|
-
const containerKey = reference.uniqueKey
|
|
58
|
-
? reference.uniqueKey
|
|
59
|
-
: remoteGlobal;
|
|
60
|
-
const __webpack_error__ = new Error();
|
|
61
|
-
// @ts-ignore
|
|
62
|
-
if (!globalThis.__remote_scope__) {
|
|
63
|
-
// create a global scope for container, similar to how remotes are set on window in the browser
|
|
64
|
-
// @ts-ignore
|
|
65
|
-
globalThis.__remote_scope__ = {
|
|
66
|
-
// @ts-ignore
|
|
67
|
-
_config: {},
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
// @ts-ignore
|
|
71
|
-
const globalScope =
|
|
72
|
-
// @ts-ignore
|
|
73
|
-
typeof window !== 'undefined' ? window : globalThis.__remote_scope__;
|
|
74
|
-
if (typeof window === 'undefined') {
|
|
75
|
-
globalScope['_config'][containerKey] = reference.url;
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
// to match promise template system, can be removed once promise template is gone
|
|
79
|
-
if (!globalScope['remoteLoading']) {
|
|
80
|
-
globalScope['remoteLoading'] = {};
|
|
81
|
-
}
|
|
82
|
-
if (globalScope['remoteLoading'][containerKey]) {
|
|
83
|
-
return globalScope['remoteLoading'][containerKey];
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
// @ts-ignore
|
|
87
|
-
asyncContainer = new Promise(function (resolve, reject) {
|
|
88
|
-
function resolveRemoteGlobal() {
|
|
89
|
-
const asyncContainer = globalScope[remoteGlobal];
|
|
90
|
-
return resolve(asyncContainer);
|
|
91
|
-
}
|
|
92
|
-
if (typeof globalScope[remoteGlobal] !== 'undefined') {
|
|
93
|
-
return resolveRemoteGlobal();
|
|
94
|
-
}
|
|
95
|
-
__webpack_require__.l(reference.url, function (event) {
|
|
96
|
-
if (typeof globalScope[remoteGlobal] !== 'undefined') {
|
|
97
|
-
return resolveRemoteGlobal();
|
|
98
|
-
}
|
|
99
|
-
const errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
|
100
|
-
const realSrc = event && event.target && event.target.src;
|
|
101
|
-
__webpack_error__.message =
|
|
102
|
-
'Loading script failed.\n(' +
|
|
103
|
-
errorType +
|
|
104
|
-
': ' +
|
|
105
|
-
realSrc +
|
|
106
|
-
' or global var ' +
|
|
107
|
-
remoteGlobal +
|
|
108
|
-
')';
|
|
109
|
-
__webpack_error__.name = 'ScriptExternalLoadError';
|
|
110
|
-
__webpack_error__.type = errorType;
|
|
111
|
-
__webpack_error__.request = realSrc;
|
|
112
|
-
reject(__webpack_error__);
|
|
113
|
-
}, containerKey);
|
|
114
|
-
}).catch(function (err) {
|
|
115
|
-
console.error('container is offline, returning fake remote');
|
|
116
|
-
console.error(err);
|
|
117
|
-
return {
|
|
118
|
-
fake: true,
|
|
119
|
-
// @ts-ignore
|
|
120
|
-
get: (arg) => {
|
|
121
|
-
console.warn('faking', arg, 'module on, its offline');
|
|
122
|
-
return Promise.resolve(() => {
|
|
123
|
-
return {
|
|
124
|
-
__esModule: true,
|
|
125
|
-
default: () => {
|
|
126
|
-
return null;
|
|
127
|
-
},
|
|
128
|
-
};
|
|
129
|
-
});
|
|
130
|
-
},
|
|
131
|
-
//eslint-disable-next-line
|
|
132
|
-
init: () => { },
|
|
133
|
-
};
|
|
134
|
-
});
|
|
135
|
-
if (typeof window !== 'undefined') {
|
|
136
|
-
globalScope['remoteLoading'][containerKey] = asyncContainer;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return asyncContainer;
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* Function to get runtime remotes
|
|
143
|
-
* @returns {RuntimeRemotesMap} - An object containing runtime remotes
|
|
144
|
-
*/
|
|
145
|
-
const getRuntimeRemotes = () => {
|
|
146
|
-
try {
|
|
147
|
-
return Object.entries(remoteVars).reduce(function (acc, item) {
|
|
148
|
-
const [key, value] = item;
|
|
149
|
-
// if its an object with a thenable (eagerly executing function)
|
|
150
|
-
if (typeof value === 'object' && typeof value.then === 'function') {
|
|
151
|
-
acc[key] = { asyncContainer: value };
|
|
152
|
-
}
|
|
153
|
-
// if its a function that must be called (lazily executing function)
|
|
154
|
-
else if (typeof value === 'function') {
|
|
155
|
-
// @ts-ignore
|
|
156
|
-
acc[key] = { asyncContainer: value };
|
|
157
|
-
}
|
|
158
|
-
// if its a delegate module, skip it
|
|
159
|
-
else if (typeof value === 'string' && value.startsWith('internal ')) {
|
|
160
|
-
const [request, query] = value.replace('internal ', '').split('?');
|
|
161
|
-
if (query) {
|
|
162
|
-
const remoteSyntax = new URLSearchParams(query).get('remote');
|
|
163
|
-
if (remoteSyntax) {
|
|
164
|
-
const [url, global] = extractUrlAndGlobal(remoteSyntax);
|
|
165
|
-
acc[key] = { global, url };
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
else if (typeof value === 'string' && !value.includes('@')) {
|
|
170
|
-
acc[key] = { global: key, url: value };
|
|
171
|
-
console.warn('delegates may need work');
|
|
172
|
-
}
|
|
173
|
-
// if its just a string (global@url)
|
|
174
|
-
else if (typeof value === 'string') {
|
|
175
|
-
const [url, global] = extractUrlAndGlobal(value);
|
|
176
|
-
acc[key] = { global, url };
|
|
177
|
-
}
|
|
178
|
-
// we dont know or currently support this type
|
|
179
|
-
else {
|
|
180
|
-
//@ts-ignore
|
|
181
|
-
console.warn('remotes process', process.env.REMOTES);
|
|
182
|
-
throw new Error(`[mf] Invalid value received for runtime_remote "${key}"`);
|
|
183
|
-
}
|
|
184
|
-
return acc;
|
|
185
|
-
}, {});
|
|
186
|
-
}
|
|
187
|
-
catch (err) {
|
|
188
|
-
console.warn('Unable to retrieve runtime remotes: ', err);
|
|
189
|
-
}
|
|
190
|
-
return {};
|
|
191
|
-
};
|
|
192
|
-
/**
|
|
193
|
-
* Function to import a delegated module
|
|
194
|
-
* @param {string | RuntimeRemote} keyOrRuntimeRemoteItem - The key or RuntimeRemote item to import
|
|
195
|
-
* @returns {Promise} - A promise that resolves with the imported module
|
|
196
|
-
*/
|
|
197
|
-
const importDelegatedModule = async (keyOrRuntimeRemoteItem) => {
|
|
198
|
-
// @ts-ignore
|
|
199
|
-
return loadScript(keyOrRuntimeRemoteItem)
|
|
200
|
-
.then((asyncContainer) => {
|
|
201
|
-
return asyncContainer;
|
|
202
|
-
})
|
|
203
|
-
.then((asyncContainer) => {
|
|
204
|
-
// most of this is only needed because of legacy promise based implementation
|
|
205
|
-
// can remove proxies once we remove promise based implementations
|
|
206
|
-
if (typeof window === 'undefined') {
|
|
207
|
-
if (!Object.hasOwnProperty.call(keyOrRuntimeRemoteItem, 'globalThis')) {
|
|
208
|
-
return asyncContainer;
|
|
209
|
-
}
|
|
210
|
-
// return asyncContainer;
|
|
211
|
-
//TODO: need to solve chunk flushing with delegated modules
|
|
212
|
-
return {
|
|
213
|
-
/**
|
|
214
|
-
* Function to get a module from the asyncContainer
|
|
215
|
-
* @param {string} arg - The module to get
|
|
216
|
-
* @returns {Promise} - A promise that resolves with the module
|
|
217
|
-
*/
|
|
218
|
-
get: function (arg) {
|
|
219
|
-
//@ts-ignore
|
|
220
|
-
return asyncContainer.get(arg).then((f) => {
|
|
221
|
-
const m = f();
|
|
222
|
-
const result = {
|
|
223
|
-
__esModule: m.__esModule,
|
|
224
|
-
};
|
|
225
|
-
for (const prop in m) {
|
|
226
|
-
if (typeof m[prop] === 'function') {
|
|
227
|
-
Object.defineProperty(result, prop, {
|
|
228
|
-
get: function () {
|
|
229
|
-
return function () {
|
|
230
|
-
if (globalThis.usedChunks) {
|
|
231
|
-
globalThis.usedChunks.add(
|
|
232
|
-
//@ts-ignore
|
|
233
|
-
`${keyOrRuntimeRemoteItem.global}->${arg}`);
|
|
234
|
-
}
|
|
235
|
-
//eslint-disable-next-line prefer-rest-params
|
|
236
|
-
return m[prop](...arguments);
|
|
237
|
-
};
|
|
238
|
-
},
|
|
239
|
-
enumerable: true,
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
else {
|
|
243
|
-
Object.defineProperty(result, prop, {
|
|
244
|
-
get: () => {
|
|
245
|
-
if (globalThis.usedChunks) {
|
|
246
|
-
globalThis.usedChunks.add(
|
|
247
|
-
//@ts-ignore
|
|
248
|
-
`${keyOrRuntimeRemoteItem.global}->${arg}`);
|
|
249
|
-
}
|
|
250
|
-
return m[prop];
|
|
251
|
-
},
|
|
252
|
-
enumerable: true,
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
if (m.then) {
|
|
257
|
-
return Promise.resolve(() => result);
|
|
258
|
-
}
|
|
259
|
-
return () => result;
|
|
260
|
-
});
|
|
261
|
-
},
|
|
262
|
-
init: asyncContainer.init,
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
else {
|
|
266
|
-
return asyncContainer;
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
};
|
|
270
|
-
/**
|
|
271
|
-
* Module exports a Promise that resolves with a remote module
|
|
272
|
-
* @returns {Promise} - A promise that resolves with the remote module
|
|
273
|
-
*/
|
|
274
|
-
// eslint-disable-next-line no-async-promise-executor
|
|
275
|
-
module.exports = new Promise(async (resolve, reject) => {
|
|
276
|
-
/**
|
|
277
|
-
* Extracting the current request from the resource query
|
|
278
|
-
*/
|
|
279
|
-
// eslint-disable-next-line no-undef
|
|
280
|
-
const currentRequest = new URLSearchParams(__resourceQuery).get('remote');
|
|
281
|
-
/**
|
|
282
|
-
* Splitting the current request into global and url
|
|
283
|
-
*/
|
|
284
|
-
// @ts-ignore
|
|
285
|
-
const [global, url] = currentRequest.split('@');
|
|
286
|
-
/**
|
|
287
|
-
* Importing the delegated module
|
|
288
|
-
*/
|
|
289
|
-
importDelegatedModule({
|
|
290
|
-
global,
|
|
291
|
-
url: url + '?' + Date.now(),
|
|
292
|
-
})
|
|
293
|
-
// @ts-ignore
|
|
294
|
-
.then((remote) => {
|
|
295
|
-
/**
|
|
296
|
-
* Resolving the promise with the remote module
|
|
297
|
-
*/
|
|
298
|
-
resolve(remote);
|
|
299
|
-
})
|
|
300
|
-
// @ts-ignore
|
|
301
|
-
.catch((err) => {
|
|
302
|
-
/**
|
|
303
|
-
* Rejecting the promise if an error occurs
|
|
304
|
-
*/
|
|
305
|
-
reject(err);
|
|
306
|
-
});
|
|
307
|
-
});
|
|
308
|
-
//# sourceMappingURL=default-delegate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"default-delegate.js","sourceRoot":"","sources":["../../src/default-delegate.ts"],"names":[],"mappings":";;AAWA;;GAEG;AACH,IAAI,IAAI,GAAG,EAAgB,CAAC;AAC5B,IAAI,CAAC;IACH;;OAEG;IACH,aAAa;IACb,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;AACtC,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC;IACX,wBAAwB;AAC1B,CAAC;AACD;;GAEG;AACH,MAAM,UAAU,GAAG,IAAkB,CAAC;AAEtC;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,CAAC,YAAoB,EAAoB,EAAE;IACrE,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACxC,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,KAAK,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpD,MAAM,IAAI,KAAK,CAAC,oBAAoB,YAAY,GAAG,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/E,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,GAAG,CAAC,sBAA8C,EAAE,EAAE;IACpE,MAAM,cAAc,GAAG,iBAAiB,EAAE,CAAC;IAE3C,qCAAqC;IACrC,IAAI,cAA+C,CAAC;IACpD,MAAM,SAAS,GACb,OAAO,sBAAsB,KAAK,QAAQ;QACxC,CAAC,CAAC,cAAc,CAAC,sBAAsB,CAAC;QACxC,CAAC,CAAC,sBAAsB,CAAC;IAE7B,IAAI,SAAS,CAAC,cAAc,EA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,cAAc,GAAG,IAAI,eAAe,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC1E;;OAEG;IACH,aAAa;IACb,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChD;;OAEG;IACH,qBAAqB,CAAC;QACpB,MAAM;QACN,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;KAC5B,CAAC;QACA,aAAa;SACZ,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QACf;;WAEG;QACH,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC,CAAC;QACF,aAAa;SACZ,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACb;;WAEG;QACH,MAAM,CAAC,GAAG,CAAC,CAAC;IACd,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { LoaderContext } from 'webpack';
|
|
2
|
-
/**
|
|
3
|
-
* This function patches the default shared loader.
|
|
4
|
-
* It requires either the default delegate module or a custom one.
|
|
5
|
-
*
|
|
6
|
-
* @param {LoaderContext<Record<string, unknown>>} this - The loader context.
|
|
7
|
-
* @param {string} content - The content to be processed.
|
|
8
|
-
* @returns {string} The processed content with required delegates.
|
|
9
|
-
*/
|
|
10
|
-
export default function patchDefaultSharedLoader(this: LoaderContext<Record<string, unknown>>, content: string): string;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/**
|
|
4
|
-
* This function patches the default shared loader.
|
|
5
|
-
* It requires either the default delegate module or a custom one.
|
|
6
|
-
*
|
|
7
|
-
* @param {LoaderContext<Record<string, unknown>>} this - The loader context.
|
|
8
|
-
* @param {string} content - The content to be processed.
|
|
9
|
-
* @returns {string} The processed content with required delegates.
|
|
10
|
-
*/
|
|
11
|
-
function patchDefaultSharedLoader(content) {
|
|
12
|
-
const { delegates } = this.getOptions();
|
|
13
|
-
/**
|
|
14
|
-
* Resolves delegates by splitting the delegate into request and query.
|
|
15
|
-
* If a query is present, it is parsed and appended to the request.
|
|
16
|
-
* The request is then contextified and absolutified.
|
|
17
|
-
*/
|
|
18
|
-
const resolvedDelegates = Object.values(delegates).map((delegate) => {
|
|
19
|
-
const [request, query] = delegate.replace('internal ', '').split('?');
|
|
20
|
-
if (query) {
|
|
21
|
-
const queries = [];
|
|
22
|
-
for (const [key, value] of new URLSearchParams(query).entries()) {
|
|
23
|
-
queries.push(`${key}=${encodeURIComponent(value)}`);
|
|
24
|
-
}
|
|
25
|
-
return this.utils.contextify(this.context, this.utils.absolutify(this._compiler?.context || '', request) +
|
|
26
|
-
'?' +
|
|
27
|
-
queries.join('&'));
|
|
28
|
-
}
|
|
29
|
-
return request;
|
|
30
|
-
});
|
|
31
|
-
/**
|
|
32
|
-
* If the content includes 'hasDelegateMarkers', return the content as is.
|
|
33
|
-
*/
|
|
34
|
-
if (content.includes('hasDelegateMarkers')) {
|
|
35
|
-
return content;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Requires each resolved delegate and appends it to the content.
|
|
39
|
-
*/
|
|
40
|
-
const requiredDelegates = resolvedDelegates.map((delegate) => {
|
|
41
|
-
return `require('${delegate}')`;
|
|
42
|
-
});
|
|
43
|
-
return ['', ...requiredDelegates, '//hasDelegateMarkers', content].join('\n');
|
|
44
|
-
}
|
|
45
|
-
exports.default = patchDefaultSharedLoader;
|
|
46
|
-
//# sourceMappingURL=delegateLoader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delegateLoader.js","sourceRoot":"","sources":["../../../src/loaders/delegateLoader.ts"],"names":[],"mappings":";;AAEA;;;;;;;GAOG;AACH,SAAwB,wBAAwB,CAE9C,OAAe;IAEf,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,UA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