Check Module Federation shared dependency configuration: detect shared/externals conflicts, antd/arco transformImport blocking shared deps, and multiple versions of the same shared package in build artifacts. Use when shared dependencies fail to be shared, or host and remote load duplicate instances of a library.
Step 1: Call the mf-context Skill (pass $ARGUMENTS) to collect MFContext.
Step 2: Serialize MFContext to JSON and pass it to the check script via the --context argument:
node scripts/shared-config-check.js --context '<MFContext-JSON>'
Process each item in the output results array:
SHARED-EXTERNALS-CONFLICT · warning — same library in both shared and externals
shared and externals are not mutually exclusive in config, but the same library must not appear in both — it causes the module to be excluded from the bundle while also being declared as shared, leading to runtime failuresSHARED-TRANSFORM-IMPORT · warning — antd/arco UI library shared but transformImport is active
babel-plugin-import (or the built-in in Modern.js / Rsbuild) rewrites import paths at build time, which prevents the shared dep from being recognized and causes sharing to fail silentlytransformImportsource.transformImport = false to disable the built-in behaviorbabel-plugin-import from the Babel configSHARED-MULTI-VERSION · warning — multiple versions of the same shared package detected
alias in the bundler config so all projects resolve to the same physical fileWhen results is empty