@module-federation/nextjs-mf 8.6.4 → 8.7.1
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/README.md +1 -1
- package/dist/package.json +4 -4
- package/dist/src/plugins/NextFederationPlugin/apply-server-plugins.js +32 -28
- package/dist/src/plugins/NextFederationPlugin/apply-server-plugins.js.map +1 -1
- package/dist/src/plugins/container/runtimePlugin.js +38 -42
- package/dist/src/plugins/container/runtimePlugin.js.map +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -133,7 +133,7 @@ I set `process.env.NEXT_PRIVATE_LOCAL_WEBPACK = 'true'` inside this plugin, but
|
|
|
133
133
|
|
|
134
134
|
"Local Webpack" means you must have webpack installed as a dependency, and next will not use its bundled copy of webpack which cannot be used as i need access to all of webpack internals
|
|
135
135
|
|
|
136
|
-
- `NEXT_PRIVATE_LOCAL_WEBPACK=true next dev` or `next build`
|
|
136
|
+
- `cross-env NEXT_PRIVATE_LOCAL_WEBPACK=true next dev` or `next build`
|
|
137
137
|
- `npm install webpack`
|
|
138
138
|
|
|
139
139
|
## Usage
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/nextjs-mf",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.7.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"webpack": "^5.40.0",
|
|
46
|
-
"next": "^12 || ^13 || ^14",
|
|
47
|
-
"react": "^17 || ^18",
|
|
48
|
-
"react-dom": "^17 || ^18",
|
|
46
|
+
"next": "^12 || ^13 || ^14 || ^15",
|
|
47
|
+
"react": "^17 || ^18 || ^19",
|
|
48
|
+
"react-dom": "^17 || ^18 || ^19",
|
|
49
49
|
"styled-jsx": "*"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
@@ -10,6 +10,7 @@ exports.handleServerExternals = handleServerExternals;
|
|
|
10
10
|
exports.configureServerCompilerOptions = configureServerCompilerOptions;
|
|
11
11
|
const path_1 = __importDefault(require("path"));
|
|
12
12
|
const InvertedContainerPlugin_1 = __importDefault(require("../container/InvertedContainerPlugin"));
|
|
13
|
+
const universe_entry_chunk_tracker_plugin_1 = __importDefault(require("@module-federation/node/universe-entry-chunk-tracker-plugin"));
|
|
13
14
|
// Modifies the Webpack entry configuration
|
|
14
15
|
function modifyEntry(options) {
|
|
15
16
|
const { compiler, staticEntry, prependEntry } = options;
|
|
@@ -54,6 +55,7 @@ function applyServerPlugins(compiler, options) {
|
|
|
54
55
|
!chunkFileName.includes(uniqueName)) {
|
|
55
56
|
compiler.options.output.chunkFilename = chunkFileName.replace('.js', suffix);
|
|
56
57
|
}
|
|
58
|
+
new universe_entry_chunk_tracker_plugin_1.default().apply(compiler);
|
|
57
59
|
new InvertedContainerPlugin_1.default().apply(compiler);
|
|
58
60
|
}
|
|
59
61
|
/**
|
|
@@ -77,35 +79,37 @@ function configureServerLibraryAndFilename(options) {
|
|
|
77
79
|
* @param {ModuleFederationPluginOptions} options - The ModuleFederationPluginOptions instance.
|
|
78
80
|
*/
|
|
79
81
|
function handleServerExternals(compiler, options) {
|
|
80
|
-
if (Array.isArray(compiler.options.externals)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
if (Array.isArray(compiler.options.externals)) {
|
|
83
|
+
const functionIndex = compiler.options.externals.findIndex((external) => typeof external === 'function');
|
|
84
|
+
if (functionIndex !== -1) {
|
|
85
|
+
const originalExternals = compiler.options.externals[functionIndex];
|
|
86
|
+
compiler.options.externals[functionIndex] = async function (ctx, callback) {
|
|
87
|
+
const fromNext = await originalExternals(ctx, callback);
|
|
88
|
+
if (!fromNext) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const req = fromNext.split(' ')[1];
|
|
92
|
+
if (ctx.request &&
|
|
93
|
+
(ctx.request.includes('@module-federation/utilities') ||
|
|
94
|
+
Object.keys(options.shared || {}).some((key) => {
|
|
95
|
+
const sharedOptions = options.shared;
|
|
96
|
+
return (sharedOptions[key]?.import !== false &&
|
|
97
|
+
(key.endsWith('/') ? req.includes(key) : req === key));
|
|
98
|
+
}) ||
|
|
99
|
+
ctx.request.includes('@module-federation/'))) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (req.startsWith('next') ||
|
|
103
|
+
req.startsWith('react/') ||
|
|
104
|
+
req.startsWith('react-dom/') ||
|
|
105
|
+
req === 'react' ||
|
|
106
|
+
req === 'styled-jsx/style' ||
|
|
107
|
+
req === 'react-dom') {
|
|
108
|
+
return fromNext;
|
|
109
|
+
}
|
|
86
110
|
return;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (ctx.request &&
|
|
90
|
-
(ctx.request.includes('@module-federation/utilities') ||
|
|
91
|
-
Object.keys(options.shared || {}).some((key) => {
|
|
92
|
-
const sharedOptions = options.shared;
|
|
93
|
-
return (sharedOptions[key]?.import !== false &&
|
|
94
|
-
(key.endsWith('/') ? req.includes(key) : req === key));
|
|
95
|
-
}) ||
|
|
96
|
-
ctx.request.includes('@module-federation/'))) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
if (req.startsWith('next') ||
|
|
100
|
-
req.startsWith('react/') ||
|
|
101
|
-
req.startsWith('react-dom/') ||
|
|
102
|
-
req === 'react' ||
|
|
103
|
-
req === 'styled-jsx/style' ||
|
|
104
|
-
req === 'react-dom') {
|
|
105
|
-
return fromNext;
|
|
106
|
-
}
|
|
107
|
-
return;
|
|
108
|
-
};
|
|
111
|
+
};
|
|
112
|
+
}
|
|
109
113
|
}
|
|
110
114
|
}
|
|
111
115
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-server-plugins.js","sourceRoot":"","sources":["../../../../src/plugins/NextFederationPlugin/apply-server-plugins.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"apply-server-plugins.js","sourceRoot":"","sources":["../../../../src/plugins/NextFederationPlugin/apply-server-plugins.ts"],"names":[],"mappings":";;;;;AAqBA,kCA6BC;AAQD,gDAqBC;AAOD,8EAWC;AAQD,sDAwDC;AAOD,wEAeC;AAjLD,gDAAwB;AACxB,mGAA2E;AAC3E,sIAA0G;AAY1G,2CAA2C;AAC3C,SAAgB,WAAW,CAAC,OAA2B;IACrD,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;IACxD,MAAM,QAAQ,GAAG,CACf,QAA+B,EAC/B,QAA+B,EACR,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAE9D,2DAA2D;IAC3D,IAAI,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;QACjD,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC;QAC3C,QAAQ,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,IAAI,EAAE;YAClC,IAAI,GAAG,GAAG,MAAM,WAAW,EAAE,CAAC;YAC9B,IAAI,WAAW,EAAE,CAAC;gBAChB,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;YACnC,CAAC;YACD,IAAI,YAAY,EAAE,CAAC;gBACjB,YAAY,CAAC,GAAG,CAAC,CAAC;YACpB,CAAC;YACD,OAAO,GAAG,CAAC;QACb,CAAC,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,gDAAgD;QAChD,IAAI,WAAW,EAAE,CAAC;YAChB,QAAQ,CAAC,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QACzE,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;oBACtB,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC;oBACxB,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC;oBAC5B,GAAG,KAAK,OAAO;oBACf,GAAG,KAAK,kBAAkB;oBAC1B,GAAG,KAAK,WAAW,EACnB,CAAC;oBACD,OAAO,QAAQ,CAAC;gBAClB,CAAC;gBACD,OAAO;YACT,CAAC,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,8BAA8B,CAAC,QAAkB;IAC/D,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,CAAC,IAAI,GAAG;QACtB,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI;QACxB,MAAM,EAAE,KAAK;KACd,CAAC;IACF,kFAAkF;IAClF,wDAAwD;IACxD,QAAQ,CAAC,OAAO,CAAC,MAAM,GAAG,YAAY,CAAC;IAEvC,+CAA+C;IAC/C,uEAAuE;IACvE,iDAAiD;IACjD,6BAA6B;IAC7B,KAAK;AACP,CAAC"}
|
|
@@ -5,11 +5,10 @@ function default_1() {
|
|
|
5
5
|
return {
|
|
6
6
|
name: 'next-internal-plugin',
|
|
7
7
|
createScript: function (args) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var attrs = args.attrs;
|
|
8
|
+
const url = args.url;
|
|
9
|
+
const attrs = args.attrs;
|
|
11
10
|
if (typeof window !== 'undefined') {
|
|
12
|
-
|
|
11
|
+
const script = document.createElement('script');
|
|
13
12
|
script.src = url;
|
|
14
13
|
script.async = true;
|
|
15
14
|
delete attrs?.['crossorigin'];
|
|
@@ -18,19 +17,20 @@ function default_1() {
|
|
|
18
17
|
return undefined;
|
|
19
18
|
},
|
|
20
19
|
errorLoadRemote: function (args) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const id = args.id;
|
|
21
|
+
const error = args.error;
|
|
22
|
+
const from = args.from;
|
|
23
|
+
//@ts-ignore
|
|
24
|
+
globalThis.moduleGraphDirty = true;
|
|
24
25
|
console.error(id, 'offline');
|
|
25
|
-
|
|
26
|
+
const pg = function () {
|
|
26
27
|
console.error(id, 'offline', error);
|
|
27
28
|
return null;
|
|
28
29
|
};
|
|
29
30
|
pg.getInitialProps = function (ctx) {
|
|
30
|
-
// Type assertion to add getInitialProps
|
|
31
31
|
return {};
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
let mod;
|
|
34
34
|
if (from === 'build') {
|
|
35
35
|
mod = function () {
|
|
36
36
|
return {
|
|
@@ -59,16 +59,17 @@ function default_1() {
|
|
|
59
59
|
!__webpack_runtime_id__.startsWith('webpack')) {
|
|
60
60
|
return args;
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
const moduleCache = args.origin.moduleCache;
|
|
63
|
+
const name = args.origin.name;
|
|
64
|
+
let gs;
|
|
65
65
|
try {
|
|
66
66
|
gs = new Function('return globalThis')();
|
|
67
67
|
}
|
|
68
68
|
catch (e) {
|
|
69
69
|
gs = globalThis; // fallback for browsers without 'unsafe-eval' CSP policy enabled
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
//@ts-ignore
|
|
72
|
+
const attachedRemote = gs[name];
|
|
72
73
|
if (attachedRemote) {
|
|
73
74
|
moduleCache.set(name, attachedRemote);
|
|
74
75
|
}
|
|
@@ -78,10 +79,10 @@ function default_1() {
|
|
|
78
79
|
return args;
|
|
79
80
|
},
|
|
80
81
|
beforeRequest: function (args) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
const options = args.options;
|
|
83
|
+
const id = args.id;
|
|
84
|
+
const remoteName = id.split('/').shift();
|
|
85
|
+
const remote = options.remotes.find(function (remote) {
|
|
85
86
|
return remote.name === remoteName;
|
|
86
87
|
});
|
|
87
88
|
if (!remote)
|
|
@@ -96,37 +97,37 @@ function default_1() {
|
|
|
96
97
|
return args;
|
|
97
98
|
},
|
|
98
99
|
onLoad: function (args) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
const exposeModuleFactory = args.exposeModuleFactory;
|
|
101
|
+
const exposeModule = args.exposeModule;
|
|
102
|
+
const id = args.id;
|
|
103
|
+
const moduleOrFactory = exposeModuleFactory || exposeModule;
|
|
103
104
|
if (!moduleOrFactory)
|
|
104
|
-
return args;
|
|
105
|
+
return args;
|
|
105
106
|
if (typeof window === 'undefined') {
|
|
106
|
-
|
|
107
|
+
let exposedModuleExports;
|
|
107
108
|
try {
|
|
108
109
|
exposedModuleExports = moduleOrFactory();
|
|
109
110
|
}
|
|
110
111
|
catch (e) {
|
|
111
112
|
exposedModuleExports = moduleOrFactory;
|
|
112
113
|
}
|
|
113
|
-
|
|
114
|
+
const handler = {
|
|
114
115
|
get: function (target, prop, receiver) {
|
|
115
|
-
// Check if accessing a static property of the function itself
|
|
116
116
|
if (target === exposedModuleExports &&
|
|
117
117
|
typeof exposedModuleExports[prop] === 'function') {
|
|
118
118
|
return function () {
|
|
119
119
|
globalThis.usedChunks.add(id);
|
|
120
|
+
//eslint-disable-next-line
|
|
120
121
|
return exposedModuleExports[prop].apply(this, arguments);
|
|
121
122
|
};
|
|
122
123
|
}
|
|
123
|
-
|
|
124
|
+
const originalMethod = target[prop];
|
|
124
125
|
if (typeof originalMethod === 'function') {
|
|
125
|
-
|
|
126
|
+
const proxiedFunction = function () {
|
|
126
127
|
globalThis.usedChunks.add(id);
|
|
128
|
+
//eslint-disable-next-line
|
|
127
129
|
return originalMethod.apply(this, arguments);
|
|
128
130
|
};
|
|
129
|
-
// Copy all enumerable properties from the original method to the proxied function
|
|
130
131
|
Object.keys(originalMethod).forEach(function (prop) {
|
|
131
132
|
Object.defineProperty(proxiedFunction, prop, {
|
|
132
133
|
value: originalMethod[prop],
|
|
@@ -141,11 +142,8 @@ function default_1() {
|
|
|
141
142
|
},
|
|
142
143
|
};
|
|
143
144
|
if (typeof exposedModuleExports === 'function') {
|
|
144
|
-
// If the module export is a function, we create a proxy that can handle both its
|
|
145
|
-
// call (as a function) and access to its properties (including static methods).
|
|
146
145
|
exposedModuleExports = new Proxy(exposedModuleExports, handler);
|
|
147
|
-
|
|
148
|
-
var staticProps = Object.getOwnPropertyNames(exposedModuleExports);
|
|
146
|
+
const staticProps = Object.getOwnPropertyNames(exposedModuleExports);
|
|
149
147
|
staticProps.forEach(function (prop) {
|
|
150
148
|
if (typeof exposedModuleExports[prop] === 'function') {
|
|
151
149
|
exposedModuleExports[prop] = new Proxy(exposedModuleExports[prop], handler);
|
|
@@ -156,7 +154,6 @@ function default_1() {
|
|
|
156
154
|
};
|
|
157
155
|
}
|
|
158
156
|
else {
|
|
159
|
-
// For objects, just wrap the exported object itself
|
|
160
157
|
exposedModuleExports = new Proxy(exposedModuleExports, handler);
|
|
161
158
|
}
|
|
162
159
|
return exposedModuleExports;
|
|
@@ -169,22 +166,21 @@ function default_1() {
|
|
|
169
166
|
!args.pkgName.startsWith('next/')) {
|
|
170
167
|
return args;
|
|
171
168
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
169
|
+
const shareScopeMap = args.shareScopeMap;
|
|
170
|
+
const scope = args.scope;
|
|
171
|
+
const pkgName = args.pkgName;
|
|
172
|
+
const version = args.version;
|
|
173
|
+
const GlobalFederation = args.GlobalFederation;
|
|
174
|
+
const host = GlobalFederation['__INSTANCES__'][0];
|
|
178
175
|
if (!host) {
|
|
179
176
|
return args;
|
|
180
177
|
}
|
|
181
178
|
if (!host.options.shared[pkgName]) {
|
|
182
179
|
return args;
|
|
183
180
|
}
|
|
184
|
-
//handle react host next remote, disable resolving when not next host
|
|
185
181
|
args.resolver = function () {
|
|
186
182
|
shareScopeMap[scope][pkgName][version] =
|
|
187
|
-
host.options.shared[pkgName][0];
|
|
183
|
+
host.options.shared[pkgName][0];
|
|
188
184
|
return shareScopeMap[scope][pkgName][version];
|
|
189
185
|
};
|
|
190
186
|
return args;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimePlugin.js","sourceRoot":"","sources":["../../../../src/plugins/container/runtimePlugin.ts"],"names":[],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"runtimePlugin.js","sourceRoot":"","sources":["../../../../src/plugins/container/runtimePlugin.ts"],"names":[],"mappings":";;AAEA,4BAuNC;AAvND;IACE,OAAO;QACL,IAAI,EAAE,sBAAsB;QAC5B,YAAY,EAAE,UAAU,IAGvB;YACC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;YACrB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YACzB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;gBAClC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;gBAChD,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;gBACjB,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;gBACpB,OAAO,KAAK,EAAE,CAAC,aAAa,CAAC,CAAC;gBAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;YAC3C,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,eAAe,EAAE,UAAU,IAK1B;YACC,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;YACnB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YACzB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YACvB,YAAY;YACZ,UAAU,CAAC,gBAAgB,GAAG,IAAI,CAAC;YACnC,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;YAED,EAAU,CAAC,eAAe,GAA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C,MAAM,IAAI,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;YAClD,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,OAAO,IAAI,CAAC;YACd,CAAC;YAED,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;gBAClC,OAAO,IAAI,CAAC;YACd,CAAC;YACD,IAAI,CAAC,QAAQ,GAAG;gBACd,aAAa,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;oBACpC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;gBAClC,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;YAChD,CAAC,CAAC;YACF,OAAO,IAAI,CAAC;QACd,CAAC;QACD,eAAe,EAAE,KAAK,WAAW,IAAS;YACxC,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/nextjs-mf",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.7.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -35,17 +35,17 @@
|
|
|
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.
|
|
42
|
-
"@module-federation/webpack-bundler-runtime": "0.6.
|
|
38
|
+
"@module-federation/runtime": "0.6.13",
|
|
39
|
+
"@module-federation/sdk": "0.6.13",
|
|
40
|
+
"@module-federation/enhanced": "0.6.13",
|
|
41
|
+
"@module-federation/node": "2.6.1",
|
|
42
|
+
"@module-federation/webpack-bundler-runtime": "0.6.13"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"webpack": "^5.40.0",
|
|
46
|
-
"next": "^12 || ^13 || ^14",
|
|
47
|
-
"react": "^17 || ^18",
|
|
48
|
-
"react-dom": "^17 || ^18",
|
|
46
|
+
"next": "^12 || ^13 || ^14 || ^15",
|
|
47
|
+
"react": "^17 || ^18 || ^19",
|
|
48
|
+
"react-dom": "^17 || ^18 || ^19",
|
|
49
49
|
"styled-jsx": "*"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|