You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
Copy file name to clipboardExpand all lines: advanced-api/dynamic-remotes/README.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,13 @@
2
2
3
3
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.
4
4
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
> These approaches provide better type safety, performance, and maintainability while still allowing runtime URL configuration.
11
+
5
12
## Project Overview
6
13
7
14
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