Skip to content

Commit d05b804

Browse files
committed
fix(rspack): update condition for provideExternalRuntime error handling
1 parent 2f31f16 commit d05b804

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/spicy-oranges-joke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/rspack': patch
3+
---
4+
5+
fix(rspack): update condition for provideExternalRuntime error handling

packages/rspack/src/ModuleFederationPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class ModuleFederationPlugin implements RspackPluginInstance {
115115
new RemoteEntryPlugin(options).apply(compiler);
116116

117117
if (options.experiments?.provideExternalRuntime) {
118-
if (options.exposes) {
118+
if (containerManager.enable) {
119119
throw new Error(
120120
'You can only set provideExternalRuntime: true in pure consumer which not expose modules.',
121121
);

0 commit comments

Comments
 (0)