اصلي منځپانګې ته لاړ شئ
JobCannon
ټول مهارتونه

Module Federation

⬢ درجه 3تخنیکي
منځنی
د معاش اغېز
2 میاشتې
د زده کړې وخت
سخت
سختوالی
1
مسلکونه
په یوه نظر

Module Federation (Webpack 5) allows micro-frontends to share components, libraries, and code at runtime. One app exposes components; another imports them dynamically. Teams report 40-60% faster development and better code reuse. Only 5-10% of frontend engineers master this; senior practitioners earn 20% premium. Mastery takes 6-8 weeks.

Module Federation څه شی دی

Module Federation (Webpack 5 feature) enables runtime code sharing between separate JavaScript applications. One app exposes components/functions; another imports them as if they were installed via npm. Webpack handles orchestration, dependency resolution, and code loading. This enables micro-frontends: large apps split into independent services, each deployed separately, each loading components from other services at runtime. Changes to one service don't require rebuilding others.

🔧 وسیلې او ایکوسیستم
Webpack 5Module Federation pluginReact remote componentsVue/Angular federationShared dependenciesRuntime compositionDynamic importsMonorepo tooling

📋 مخکې له دې چې تاسو پیل کړئ

💰 د سیمې له مخې معاش

سیمهجونیرمنځنیسېنیر
USA$95k$155k$240k
UK£58k£95k£145k
EU€65k€105k€160k
CANADAC$90kC$150kC$230k

🎯 هغه مسلکونه چې Module Federation کاروي

⚖ سره پرتله کړئ

❓ ډېرې پوښتل شوې پوښتنې

How does Module Federation work?
Host app loads remote app. Remote exposes components/functions. Host imports them at runtime. Webpack handles versioning, shared dependencies, dynamic loading. Example: host loads Button component from remote app.
What's the difference between Module Federation and npm packages?
npm packages: version locked, bundled at build time. Module Federation: runtime loading, can update remote without rebuilding host. Host can load different remote versions simultaneously.
How do shared dependencies work?
Define shared array in Webpack config. MF ensures single copy of dependency across host+remotes. Avoids React duplication (two Reacts = breaking). Versioning: use highest compatible version, fallback to local if unavailable.
Can I use Module Federation with TypeScript?
Yes, but types don't cross boundaries automatically. Host doesn't know remote component types at build time (loaded at runtime). Solutions: use JSDoc, @types files, or type inference. Not ideal but workable.
What about error handling when remote fails?
Remote might not load (network error, outdated URL). Wrap remote components in error boundary. Fallback to local version. Retry logic. User sees graceful degradation, not broken page.
How do I version remote components?
Use semantic versioning in remote config. Host can request specific version or any compatible version. MF downloads matching version. Allows gradual rollouts of breaking changes.

ډاډه نه یاست چې دا مهارت ستاسو لپاره دی؟

د کاري مسلک سمون ازموینه واخلئ — موږ به تاسو ته سمې لارې وړاندیز کړو.

زما لپاره غوره مهارتونه ومومئ →

خپل غوره مسلکي لاره ومومئ

د ۲٬۵۲۱ مسلکونو په اوږدو کې د مهارت پر بنسټ سمون. وړیا.

د کاري مسلک سمون ازموینه واخلئ — وړیا →