Skip to content

Commit 4d79e8e

Browse files
docs: add runtime plugin recommendations to dynamic-remotes README
Add important note clarifying when to use dynamic remotes vs runtime plugins: - True dynamic remotes (unknown imports at build time) are very rare - For most cases, runtime plugins provide better solution - Link to remote-control and remote-router examples - Emphasize type safety, performance, and maintainability benefits This helps developers choose the right approach for their use case. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 839f7a5 commit 4d79e8e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

advanced-api/dynamic-remotes/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
This example demonstrates advanced Module Federation capabilities for **dynamic remote loading** and **vendor code sharing** between unknown remotes at runtime. It showcases how a host application can load remote components on-demand without compile-time knowledge of their locations, while efficiently sharing dependencies.
44

5+
> **⚠️ Important Note**: True dynamic remotes (where you don't know what you're importing at build time) are **very rare** in practice. For most use cases where you need dynamic remote URLs but know the component interfaces, consider using **runtime plugins** instead:
6+
>
7+
> - **[Remote Control Example](../../runtime-plugins/remote-control)** - Dynamic remote URL configuration with runtime plugins
8+
> - **[Remote Router Example](../../runtime-plugins/remote-router)** - Dynamic routing with runtime remote management
9+
>
10+
> These approaches provide better type safety, performance, and maintainability while still allowing runtime URL configuration.
11+
512
## Project Overview
613

714
This example illustrates the power of Module Federation's runtime API for creating truly dynamic micro-frontend architectures. The host application (`app1`) can dynamically load and render components from remote applications (`app2` and `app3`) at runtime, demonstrating vendor sharing optimization where dependencies like React and Moment.js are shared efficiently between applications.

0 commit comments

Comments
 (0)