@module-federation/nextjs-mf 8.7.2 → 8.7.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/dist/package.json
CHANGED
|
@@ -6,7 +6,6 @@ interface InvertedContainerRuntimeModuleOptions {
|
|
|
6
6
|
declare class InvertedContainerRuntimeModule extends RuntimeModule {
|
|
7
7
|
private options;
|
|
8
8
|
constructor(options: InvertedContainerRuntimeModuleOptions);
|
|
9
|
-
private findEntryModuleOfContainer;
|
|
10
9
|
generate(): string;
|
|
11
10
|
}
|
|
12
11
|
export default InvertedContainerRuntimeModule;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const normalize_webpack_path_1 = require("@module-federation/sdk/normalize-webpack-path");
|
|
4
|
-
const enhanced_1 = require("@module-federation/enhanced");
|
|
5
4
|
const { RuntimeModule, Template, RuntimeGlobals } = require((0, normalize_webpack_path_1.normalizeWebpackPath)('webpack'));
|
|
6
5
|
class InvertedContainerRuntimeModule extends RuntimeModule {
|
|
7
6
|
constructor(options) {
|
|
8
7
|
super('inverted container startup', RuntimeModule.STAGE_TRIGGER);
|
|
9
8
|
this.options = options;
|
|
10
9
|
}
|
|
11
|
-
findEntryModuleOfContainer() {
|
|
12
|
-
if (!this.chunk || !this.chunkGraph)
|
|
13
|
-
return undefined;
|
|
14
|
-
const modules = this.chunkGraph.getChunkModules(this.chunk);
|
|
15
|
-
return Array.from(modules).find((module) => module instanceof enhanced_1.container.ContainerEntryModule);
|
|
16
|
-
}
|
|
17
10
|
generate() {
|
|
18
11
|
const { compilation, chunk, chunkGraph } = this;
|
|
19
12
|
if (!compilation || !chunk || !chunkGraph) {
|
|
@@ -33,6 +26,10 @@ class InvertedContainerRuntimeModule extends RuntimeModule {
|
|
|
33
26
|
}
|
|
34
27
|
if (!containerEntryModule)
|
|
35
28
|
return '';
|
|
29
|
+
if (compilation.chunkGraph.isEntryModuleInChunk(containerEntryModule, chunk)) {
|
|
30
|
+
// dont apply to remote entry itself
|
|
31
|
+
return '';
|
|
32
|
+
}
|
|
36
33
|
const initRuntimeModuleGetter = compilation.runtimeTemplate.moduleRaw({
|
|
37
34
|
module: containerEntryModule,
|
|
38
35
|
chunkGraph,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvertedContainerRuntimeModule.js","sourceRoot":"","sources":["../../../../src/plugins/container/InvertedContainerRuntimeModule.ts"],"names":[],"mappings":";;AAAA,0FAAqF;
|
|
1
|
+
{"version":3,"file":"InvertedContainerRuntimeModule.js","sourceRoot":"","sources":["../../../../src/plugins/container/InvertedContainerRuntimeModule.ts"],"names":[],"mappings":";;AAAA,0FAAqF;AAIrF,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,OAAO,CACzD,IAAA,6CAAoB,EAAC,SAAS,CAAC,CACJ,CAAC;AAO9B,MAAM,8BAA+B,SAAQ,aAAa;IAGxD,YAAY,OAA8C;QACxD,KAAK,CAAC,4BAA4B,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;QACjE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEQ,QAAQ;QACf,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAChD,IAAI,CAAC,WAAW,IAAI,CAAC,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC;YAC1C,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,IAAI,KAAK,CAAC,OAAO,KAAK,qBAAqB,EAAE,CAAC;YAC5C,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,IAAI,oBAAoB,CAAC;QACzB,KAAK,MAAM,YAAY,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;YACnD,MAAM,GAAG,GAAG,WAAW,CAAC,WAAW,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;YAC5D,IAAI,CAAC,GAAG;gBAAE,SAAS;YACnB,IAAI,UAAU,CAAC,eAAe,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC;gBAC3C,oBAAoB,GAAG,GAA2B,CAAC;YACrD,CAAC;QACH,CAAC;QAED,IAAI,CAAC,oBAAoB;YAAE,OAAO,EAAE,CAAC;QAErC,IACE,WAAW,CAAC,UAAU,CAAC,oBAAoB,CAAC,oBAAoB,EAAE,KAAK,CAAC,EACxE,CAAC;YACD,oCAAoC;YACpC,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,uBAAuB,GAAG,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC;YACpE,MAAM,EAAE,oBAAoB;YAC5B,UAAU;YACV,IAAI,EAAE,KAAK;YACX,mBAAmB,EAAE,IAAI,GAAG,EAAE;SAC/B,CAAC,CAAC;QAEH,YAAY;QACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAE5D,OAAO,QAAQ,CAAC,QAAQ,CAAC;YACvB,kBAAkB;YAClB,4BAA4B;YAC5B,QAAQ,CAAC,MAAM,CAAC;gBACd,iBAAiB,uBAAuB,GAAG;gBAC3C,YAAY,cAAc,CAAC,MAAM,gBAAgB;gBACjD,MAAM,QAAQ,iBAAiB;gBAC/B,qBAAqB;aACtB,CAAC;YACF,IAAI;YACJ,iBAAiB;SAClB,CAAC,CAAC;IACL,CAAC;CACF;AAED,kBAAe,8BAA8B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/nextjs-mf",
|
|
3
|
-
"version": "8.7.
|
|
3
|
+
"version": "8.7.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"fast-glob": "^3.2.11",
|
|
38
|
-
"@module-federation/runtime": "0.6.
|
|
39
|
-
"@module-federation/sdk": "0.6.
|
|
40
|
-
"@module-federation/enhanced": "0.6.
|
|
41
|
-
"@module-federation/node": "2.6.
|
|
42
|
-
"@module-federation/webpack-bundler-runtime": "0.6.
|
|
38
|
+
"@module-federation/runtime": "0.6.15",
|
|
39
|
+
"@module-federation/sdk": "0.6.15",
|
|
40
|
+
"@module-federation/enhanced": "0.6.15",
|
|
41
|
+
"@module-federation/node": "2.6.3",
|
|
42
|
+
"@module-federation/webpack-bundler-runtime": "0.6.15"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"webpack": "^5.40.0",
|