Skip to content

Commit

Permalink
refactor(getOptionsFromWebpackConfig): improve regex pattern for find…
Browse files Browse the repository at this point in the history
…ing ModuleFederationPlugin
  • Loading branch information
steven-pribilinskiy committed Oct 20, 2024
1 parent 63b8a84 commit a29a143
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/helpers/getOptionsFromWebpackConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function getOptionsFromWebpackConfig(webpackConfigPath: string) {

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

0 comments on commit a29a143

Please sign in to comment.