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.
- Author
- nextboxis ↗
- Repository
- library-skill-agents ↗
- Licence
- MIT
- Last repository change
- 28.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 28.10.2026, without references to retired models or APIs.
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
- When to use
- Prerequisites
- Step-by-step workflow
- Commands / code examples
- Common mistakes & pitfalls
- Verification checklist
- Related skills
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,…