Skip to content

Commit 2f65415

Browse files
chore(enhanced): regenerate schemas; simplify SharePlugin options wiring
1 parent 8a8db73 commit 2f65415

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

packages/enhanced/src/lib/container/ModuleFederationPlugin.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -214,18 +214,15 @@ class ModuleFederationPlugin implements WebpackPluginInstance {
214214
}).apply(compiler);
215215
}
216216
if (options.shared) {
217-
// build SharePlugin options and forward aliasConsumption only when defined
218-
const sharePluginOptions: import('../../declarations/plugins/sharing/SharePlugin').SharePluginOptions & {
219-
experiments?: { aliasConsumption?: boolean };
220-
} = {
217+
// Build SharePlugin options and pass through aliasConsumption directly
218+
const shareOpts = {
221219
shared: options.shared,
222220
shareScope: options.shareScope,
221+
experiments: {
222+
aliasConsumption: options.experiments?.aliasConsumption,
223+
},
223224
};
224-
const aliasConsumption = options.experiments?.aliasConsumption;
225-
if (typeof aliasConsumption === 'boolean') {
226-
sharePluginOptions.experiments = { aliasConsumption };
227-
}
228-
new SharePlugin(sharePluginOptions).apply(compiler);
225+
new SharePlugin(shareOpts).apply(compiler);
229226
}
230227
});
231228

0 commit comments

Comments
 (0)