From f52a296a53b3a2c3c2d52a72c5e8bc3cfd1e570b Mon Sep 17 00:00:00 2001 From: David Festal Date: Wed, 8 Apr 2026 14:01:43 +0200 Subject: [PATCH] fix(cli-module-build): ignore MF version warning for secondary entry points Signed-off-by: David Festal --- .changeset/plenty-weeks-stop.md | 5 +++++ packages/cli-module-build/src/lib/bundler/config.ts | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 .changeset/plenty-weeks-stop.md diff --git a/.changeset/plenty-weeks-stop.md b/.changeset/plenty-weeks-stop.md new file mode 100644 index 0000000000..1461c5af1f --- /dev/null +++ b/.changeset/plenty-weeks-stop.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli-module-build': patch +--- + +Suppressed false-positive Module Federation warning for shared dependencies that use secondary entry points (e.g. `@mui/material/styles`). These sub-path `package.json` files lack a `version` field, causing the bundler to emit "No version specified" warnings that fail CI builds. diff --git a/packages/cli-module-build/src/lib/bundler/config.ts b/packages/cli-module-build/src/lib/bundler/config.ts index cee7ba6819..d3e5f01eac 100644 --- a/packages/cli-module-build/src/lib/bundler/config.ts +++ b/packages/cli-module-build/src/lib/bundler/config.ts @@ -394,5 +394,16 @@ export async function createConfig( }), }, plugins, + ...(options.moduleFederationRemote && { + // TODO: remove this warning skipping as soon as the corresponding bundler limitation + // described in issue https://github.com/web-infra-dev/rspack/issues/13635 is fixed + // when PR: https://github.com/web-infra-dev/rspack/pull/13636 is merged. + ignoreWarnings: [ + { + message: + /No version specified and unable to automatically determine one\. No version in description file/, + }, + ], + }), }; }