From a29a14316791aa8ad652238b955a11882fbbfc17 Mon Sep 17 00:00:00 2001 From: Steven Prybylynskyi Date: Sun, 20 Oct 2024 23:18:06 +0200 Subject: [PATCH] refactor(getOptionsFromWebpackConfig): improve regex pattern for finding ModuleFederationPlugin --- src/bin/helpers/getOptionsFromWebpackConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/helpers/getOptionsFromWebpackConfig.ts b/src/bin/helpers/getOptionsFromWebpackConfig.ts index d60ed04..cbe0ee6 100644 --- a/src/bin/helpers/getOptionsFromWebpackConfig.ts +++ b/src/bin/helpers/getOptionsFromWebpackConfig.ts @@ -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 }; }