mf-config-check

Validates Module Federation build configurations including plugin integration, async entry setup, and exposes paths via Node.js script analysis.

2.6k|423|Updated Oct 24, 2020
One-click install
npx skills add https://github.com/module-federation/core --skill mf-config-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mf-config-check
Source: https://github.com/module-federation/core/tree/main/skills/mf-config-check
Command: npx skills add https://github.com/module-federation/core --skill mf-config-check

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires fs, path, and includes scripts (resource) components.

What problem does it solve?

This Skill helps identify and fix common misconfigurations in Module Federation setups that lead to build errors, missing modules, or runtime initialization failures.

Core Features & Use Cases

  • Configuration Validation: Checks for correct Module Federation plugin usage based on the detected bundler (Webpack, Rspack, Rsbuild, Modern.js, Next.js).
  • Exposes Path Verification: Ensures that all paths specified in the exposes configuration exist within the project.
  • Async Entry Check: Verifies if experiments.asyncStartup is correctly configured, which is crucial for avoiding runtime errors.
  • Use Case: When your micro-frontend applications fail to load modules or encounter runtime errors after a build, this Skill can pinpoint whether the issue lies in the plugin setup, incorrect exposes paths, or missing asynchronous startup configuration.

Quick Start

Use the mf-config-check skill to analyze the module federation configuration in the current project.

Frequently Asked Questions about mf-config-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my Module Federation build fail to load exposed modules at runtime?

Module Federation runtime errors often stem from incorrect plugin usage or missing `experiments.asyncStartup` setup. You can validate your configuration to check for proper async entry integration and ensure exposed modules are correctly initialized.

How do I check if my Module Federation exposes paths are configured correctly?

To check your Module Federation exposes paths, run a validation script that verifies all specified paths in the `exposes` configuration actually exist within your project directory to prevent missing module build outputs.

Does Module Federation configuration validation work with Rspack and Next.js?

Module Federation configuration validation works with multiple bundlers including Webpack, Rspack, Rsbuild, Modern.js, and Next.js. It checks for correct plugin integration specific to the detected bundler environment.

What causes Module Federation runtime initialization errors after a successful build?

Module Federation runtime initialization errors are frequently caused by an incorrectly configured `experiments.asyncStartup` entry. Validating your async entry setup ensures the asynchronous startup process is properly enabled.

How do I debug missing modules in my Webpack micro-frontend build outputs?

Debug missing modules in Webpack micro-frontend builds by validating your Module Federation plugin setup and verifying that your `exposes` paths point to existing files, resolving build output discrepancies.