@module-federation/modern-js 0.0.0-next-20250219082408 → 0.0.0-next-20250219103339
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/cjs/cli/utils.js
CHANGED
|
@@ -227,19 +227,19 @@ function patchBundlerConfig(options) {
|
|
|
227
227
|
var _modernjsConfig_server, _modernjsConfig_deploy;
|
|
228
228
|
const { chain, modernjsConfig, isServer, mfConfig } = options;
|
|
229
229
|
const enableSSR = Boolean((_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
|
|
230
|
-
chain.optimization.runtimeChunk
|
|
230
|
+
chain.optimization.delete("runtimeChunk");
|
|
231
231
|
if (!chain.output.get("chunkLoadingGlobal")) {
|
|
232
232
|
chain.output.chunkLoadingGlobal(`chunk_${mfConfig.name}`);
|
|
233
233
|
}
|
|
234
234
|
if (!chain.output.get("uniqueName")) {
|
|
235
235
|
chain.output.uniqueName(mfConfig.name);
|
|
236
236
|
}
|
|
237
|
-
const
|
|
237
|
+
const splitChunkConfig = chain.optimization.splitChunks.entries();
|
|
238
238
|
if (!isServer) {
|
|
239
|
-
(0, import_utils.autoDeleteSplitChunkCacheGroups)(mfConfig,
|
|
239
|
+
(0, import_utils.autoDeleteSplitChunkCacheGroups)(mfConfig, splitChunkConfig);
|
|
240
240
|
}
|
|
241
|
-
if (!isServer && enableSSR &&
|
|
242
|
-
|
|
241
|
+
if (!isServer && enableSSR && splitChunkConfig && typeof splitChunkConfig === "object" && splitChunkConfig.cacheGroups) {
|
|
242
|
+
splitChunkConfig.chunks = "async";
|
|
243
243
|
import_logger.default.warn(`splitChunks.chunks = async is not allowed with stream SSR mode, it will auto changed to "async"`);
|
|
244
244
|
}
|
|
245
245
|
if (isDev && chain.output.get("publicPath") === "auto") {
|
package/dist/esm/cli/utils.js
CHANGED
|
@@ -219,19 +219,19 @@ function patchBundlerConfig(options) {
|
|
|
219
219
|
var _modernjsConfig_server, _modernjsConfig_deploy;
|
|
220
220
|
var chain = options.chain, modernjsConfig = options.modernjsConfig, isServer = options.isServer, mfConfig = options.mfConfig;
|
|
221
221
|
var enableSSR = Boolean((_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
|
|
222
|
-
chain.optimization.runtimeChunk
|
|
222
|
+
chain.optimization.delete("runtimeChunk");
|
|
223
223
|
if (!chain.output.get("chunkLoadingGlobal")) {
|
|
224
224
|
chain.output.chunkLoadingGlobal("chunk_".concat(mfConfig.name));
|
|
225
225
|
}
|
|
226
226
|
if (!chain.output.get("uniqueName")) {
|
|
227
227
|
chain.output.uniqueName(mfConfig.name);
|
|
228
228
|
}
|
|
229
|
-
var
|
|
229
|
+
var splitChunkConfig = chain.optimization.splitChunks.entries();
|
|
230
230
|
if (!isServer) {
|
|
231
|
-
autoDeleteSplitChunkCacheGroups(mfConfig,
|
|
231
|
+
autoDeleteSplitChunkCacheGroups(mfConfig, splitChunkConfig);
|
|
232
232
|
}
|
|
233
|
-
if (!isServer && enableSSR &&
|
|
234
|
-
|
|
233
|
+
if (!isServer && enableSSR && splitChunkConfig && (typeof splitChunkConfig === "undefined" ? "undefined" : _type_of(splitChunkConfig)) === "object" && splitChunkConfig.cacheGroups) {
|
|
234
|
+
splitChunkConfig.chunks = "async";
|
|
235
235
|
logger.warn('splitChunks.chunks = async is not allowed with stream SSR mode, it will auto changed to "async"');
|
|
236
236
|
}
|
|
237
237
|
if (isDev && chain.output.get("publicPath") === "auto") {
|
|
@@ -190,19 +190,19 @@ function patchBundlerConfig(options) {
|
|
|
190
190
|
var _modernjsConfig_server, _modernjsConfig_deploy;
|
|
191
191
|
const { chain, modernjsConfig, isServer, mfConfig } = options;
|
|
192
192
|
const enableSSR = Boolean((_modernjsConfig_server = modernjsConfig.server) === null || _modernjsConfig_server === void 0 ? void 0 : _modernjsConfig_server.ssr);
|
|
193
|
-
chain.optimization.runtimeChunk
|
|
193
|
+
chain.optimization.delete("runtimeChunk");
|
|
194
194
|
if (!chain.output.get("chunkLoadingGlobal")) {
|
|
195
195
|
chain.output.chunkLoadingGlobal(`chunk_${mfConfig.name}`);
|
|
196
196
|
}
|
|
197
197
|
if (!chain.output.get("uniqueName")) {
|
|
198
198
|
chain.output.uniqueName(mfConfig.name);
|
|
199
199
|
}
|
|
200
|
-
const
|
|
200
|
+
const splitChunkConfig = chain.optimization.splitChunks.entries();
|
|
201
201
|
if (!isServer) {
|
|
202
|
-
autoDeleteSplitChunkCacheGroups(mfConfig,
|
|
202
|
+
autoDeleteSplitChunkCacheGroups(mfConfig, splitChunkConfig);
|
|
203
203
|
}
|
|
204
|
-
if (!isServer && enableSSR &&
|
|
205
|
-
|
|
204
|
+
if (!isServer && enableSSR && splitChunkConfig && typeof splitChunkConfig === "object" && splitChunkConfig.cacheGroups) {
|
|
205
|
+
splitChunkConfig.chunks = "async";
|
|
206
206
|
logger.warn(`splitChunks.chunks = async is not allowed with stream SSR mode, it will auto changed to "async"`);
|
|
207
207
|
}
|
|
208
208
|
if (isDev && chain.output.get("publicPath") === "auto") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/modern-js",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20250219103339",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/",
|
|
6
6
|
"types.d.ts",
|
|
@@ -89,10 +89,10 @@
|
|
|
89
89
|
"@swc/helpers": "0.5.13",
|
|
90
90
|
"node-fetch": "~3.3.0",
|
|
91
91
|
"react-error-boundary": "4.1.2",
|
|
92
|
-
"@module-federation/rsbuild-plugin": "0.0.0-next-
|
|
93
|
-
"@module-federation/enhanced": "0.0.0-next-
|
|
94
|
-
"@module-federation/node": "0.0.0-next-
|
|
95
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
92
|
+
"@module-federation/rsbuild-plugin": "0.0.0-next-20250219103339",
|
|
93
|
+
"@module-federation/enhanced": "0.0.0-next-20250219103339",
|
|
94
|
+
"@module-federation/node": "0.0.0-next-20250219103339",
|
|
95
|
+
"@module-federation/sdk": "0.0.0-next-20250219103339"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@modern-js/app-tools": "2.64.3",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"@modern-js/module-tools": "2.64.3",
|
|
101
101
|
"@modern-js/runtime": "2.64.3",
|
|
102
102
|
"@modern-js/tsconfig": "2.64.3",
|
|
103
|
-
"@module-federation/manifest": "0.0.0-next-
|
|
103
|
+
"@module-federation/manifest": "0.0.0-next-20250219103339"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"react": ">=17",
|