Skip to content

Commit a29a143

Browse files
refactor(getOptionsFromWebpackConfig): improve regex pattern for finding ModuleFederationPlugin
1 parent 63b8a84 commit a29a143

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/bin/helpers/getOptionsFromWebpackConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function getOptionsFromWebpackConfig(webpackConfigPath: string) {
2525

2626
function getModuleFederationPluginOptions(config: Compiler['options']) {
2727
const plugin = config.plugins.find(
28-
nextPlugin => nextPlugin!.constructor.name === 'ModuleFederationPlugin',
28+
nextPlugin => /^_?ModuleFederationPlugin$/.test(nextPlugin!.constructor.name),
2929
);
3030
return (plugin as Dict)?._options as Dict & { remotes?: Dict<string> };
3131
}

0 commit comments

Comments
 (0)