Skip to content

Commit 7f2ab6d

Browse files
committed
feat(mf): inject remoteInfos to support lazy compilation
1 parent f72a069 commit 7f2ab6d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/rspack/src/runtime/moduleFederationDefaultRuntime.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ module.exports = function () {
159159
"chunkMapping",
160160
() => remotesLoadingChunkMapping
161161
);
162+
early(
163+
__webpack_require__.federation.bundlerRuntimeOptions.remotes,
164+
"remoteInfos",
165+
() => __module_federation_remote_infos__
166+
);
162167
early(
163168
__webpack_require__.federation.bundlerRuntimeOptions.remotes,
164169
"idToExternalAndNameMapping",
@@ -262,7 +267,7 @@ module.exports = function () {
262267
throw new Error(
263268
'Module "' + module + '" does not exist in container.'
264269
);
265-
});
270+
});
266271
__webpack_require__.R = undefined;
267272
return getScope;
268273
});

0 commit comments

Comments
 (0)