mf-config-check
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/config-exposes-check.js --context '<MFContext-JSON>'
Process each item in the output results array:
CONFIG-PLUGIN · warning — incorrect or missing MF plugin
- Based on the detected bundler and installed packages, the recommended plugin is:
- Webpack only:
@module-federation/enhancedor@module-federation/enhanced/webpack - Rspack only:
@module-federation/enhanced/rspack(recommended) or@module-federation/rspack - Rsbuild:
@module-federation/rsbuild-plugin(recommended), or the Rspack plugin - Modern.js:
@module-federation/modern-js-v3for@modern-js/app-tools≥ 3.0.0, otherwise@module-federation/modern-js; falls back to Rspack/Webpack plugin based on the underlying bundler - Next.js:
@module-federation/nextjs-mf
- Webpack only:
- Show the detected bundler, installed MF-related packages, and the recommended plugin
CONFIG-ASYNC-ENTRY · warning — async entry not configured (maps to RUNTIME-006)
experiments.asyncStartup = trueis not set in the bundler config- This setting is required by most bundler setups to avoid runtime initialization errors
- Exception: not required when using
@module-federation/modern-js-v3or@module-federation/modern-js - Note: Rspack requires version > 1.7.4 to support this option
- Reference: https://module-federation.io/blog/hoisted-runtime.md
- To check: read
bundler.configFilefrom MFContext and look forexperiments.asyncStartup
CONFIG-EXPOSES-KEY · warning — key does not start with ./
- MF spec requires exposes keys to start with
./(e.g.,"./Button"not"Button") - Inform the user of the specific key name and guide them to correct the format
CONFIG-EXPOSES-PATH · warning — path does not exist
- The file referenced by the exposes value does not exist in the project. Show the specific key and incorrect path.
- The check must match the exact file extension (e.g.,
.tsx≠.ts) - Common causes:
- Typo in file path
- Wrong file extension
- Incorrect relative path base (should be relative to project root)
When results is empty
- Inform the user that plugin selection, async entry config, and exposes passed all checks
More from module-federation/core
mf
All-in-one Module Federation skill. Use when the user asks anything about MF — concepts, configuration, runtime API, shared dependencies, type errors, runtime error code troubleshooting, slow builds, Bridge integration, or adding MF to an existing project.
412mf-integrate
Integrate Module Federation into an existing project — add provider (exposes modules) or consumer (loads remote modules) configuration. Use when the user wants to add Module Federation to an existing Rsbuild / Rspack / Webpack / Modern.js / Next.js / Vite project, set up a remote, create a host app, or quickly consume the demo provider to see MF working. Default role is consumer.
107mf-docs
Answer questions about Module Federation (MF) — configuration, runtime API, build plugins (Webpack/Rspack/Rsbuild/Vite), framework integration (React/Vue/Next.js/Modern.js/Angular), shared dependencies, exposes, remotes, debugging, troubleshooting, and micro-frontend architecture. Use this skill when the user asks anything about module federation, remote modules, shared deps, mf-manifest, federation runtime, or micro-frontends with MF.
100turborepo
|
40gh-pr-metadata
Update the current GitHub PR title and body for this repository so they match the repo's pull request template and conventional-commit title style. Use when a PR title is vague or misformatted, when the PR body is missing required sections or checklist items, when Codex needs to normalize PR metadata before review or merge, or when GitHub comments/checks indicate the PR title or body should be corrected.
28