Skip to content
Skills Library
Programming · Building & coding

micro-frontends-module-federation

/micro-frontends-module-federation

Use this skill when orchestrating independently deployed frontend applications at runtime using Webpack or Vite Module Federation.

Licence
MIT
Last repository change
28.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 28.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use this skill when orchestrating independently deployed frontend applications at runtime using Webpack or Vite Module Federation.

Original author description

Use this skill when orchestrating independently deployed frontend applications at runtime using Webpack or Vite Module Federation.

How it works

  1. When to use
  2. Prerequisites
  3. Step-by-step workflow
  4. Commands / code examples
  5. Common mistakes & pitfalls
  6. Verification checklist
  7. Related skills
Original SKILL.md headings · 72 lines, 360 words
SKILL.md preview
---
name: micro-frontends-module-federation
description: Use this skill when orchestrating independently deployed frontend applications at runtime using Webpack or Vite Module Federation.
---
# Micro-Frontends & Module Federation

## When to use
Use this skill when scaling large frontend engineering teams, decoupling deploy pipelines across autonomous domain teams, or sharing runtime dependencies.

## Prerequisites
- Node.js 18+ with Webpack 5+ or Vite with `@originjs/vite-plugin-federation`.
- Thorough understanding of single-spa or container/remote micro-frontend paradigms.

## Step-by-step workflow
1. **Establish host and remote roles**: Define container hosts (shell applications) and autonomous remote applications (domain feature suites).
2. **Configure remote federation**: Expose shared component entry points in the remote configuration using `exposes`.
3. **Configure host remotes**: Register remote URL endpoints inside the host configuration under the `remotes` block.
4. **Define shared singleton dependencies**: Declare shared runtime libraries (`react`, `react-dom`, design system tokens) with strict version constraints.
5. **Implement fallback error boundaries**: Wrap remote component imports in React `Suspense` and error boundaries to prevent total shell crashes.

## Commands / code examples
```ts
// remote/webpack.config.js
const { ModuleFederationPlugin } = require('webpack').container;

module.exports = {
  plugins: [
    new ModuleFederationPlugin({
      name: 'billing_app',
      filename: 'remoteEntry.js',
      exposes: {
        './InvoiceWidget': './src/components/InvoiceWidget.tsx',
      },
      shared: {
        react: { singleton: true, requiredVersion: '^18.2.0', eager: false },
        'react-dom': { singleton: true, requiredVersion: '^18.2.0', eager: false },
      },
    }),
  ],
};

// host/src/App.tsx
import React, { Suspense, lazy } from 'react';

// Dynamic runtime import of remote federated module
const RemoteInvoiceWidget = lazy(() => import('billing_app/InvoiceWidget'));

export function HostDashboard() {
  return (
    <div class="dashboard-shell">
      <header>Enterprise Shell</header>
      <Suspense fallback={<div>Loading remote billing module...</div>}>
        <RemoteInvoiceWidget customerId="cust_12345" />
      </Suspense>
    </div>
  );
}
```

## Common mistakes & pitfalls
- Mismatched shared dependency versions without `singleton: true`, leading to multiple React instances running concurrently.
- Omitting error boundaries around remote components, causing the entire shell to crash if a single remote fails.
- Hardcoding static remote URLs instead of supporting dynamic environment-based injection at runtime.

## Verification checklist
- [ ] Shared singletons (like React) resolve to exactly one runtime instance.
- [ ] Remote failures are caught gracefully by local host error boundaries.
- [ ] Remotes can be built and deployed independently without rebuilding the host.
- [ ] Network bundles load asynchronously only when the remote route is accessed.

## Related skills
- react-fundamentals
- monorepo-management-turborepo-nx
- bundlers-vite-esbuild-webpack-swc
- ci-cd-github-actions-workflows

Versions

The database has no other skills named micro-frontends-module-federation.

Database snapshot: 13.11.2026 · package version 8cadab8fd104 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95module-federation-runtime-sharing
    Use this skill when the user says 'module federation config', 'remoteEntry', 'mf-manifest', 'shared singleton', 'Rspack module federation', '@module-federation/enhanced', 'eager consumption error', 'federated types'. It configures Module Federation (Webpack 5, Rspack, Vite via…
  • 95web-micro-frontends-import-maps
    Use this skill when the user says 'import maps', 'single-spa', 'native federation', 'micro-frontends without webpack', 'ES module micro-frontends', 'mount/unmount lifecycle', 'framework-agnostic micro-frontend'. It composes micro-frontends with browser-native ES modules and…
  • 100micro-frontends
    Micro-frontend architecture — composition approaches, Module Federation, single-spa, web components, shared state, and inter-app communication. Covers the patterns and tradeoffs for splitting a frontend across independent teams. USE FOR: micro-frontend architecture, Module…
  • 100micro-frontends
    Decides whether micro-frontends are worth it and, if so, designs them - composition approach (separate apps per route, build-time packages, Module Federation, import maps, single-spa, Web Components, iframes, server or edge composition), shared dependencies and version skew,…
  • 100webpack
    Expert Webpack assistance covering asset bundling, code splitting, loaders, plugins, caching strategies, and webpack.config.js optimization. Use when configuring Webpack 5, optimizing bundle sizes, setting up Babel/TypeScript loaders, or configuring Module Federation.
  • 100rsbuild
    Rsbuild is a Rspack-based build tool for web applications with a built-in dev server, TypeScript, CSS and asset support, and 5 to 10 times faster builds than webpack. Use when a developer asks to set up Rsbuild for React, Vue, Svelte or vanilla projects, migrate from webpack,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.