How do i enable Live Reload If I am registering Remotes in Runtime? #4445
Unanswered
shashank-vritti
asked this question in
Q&A
Replies: 2 comments 1 reply
-
|
@ScriptedAlchemy Can you please comment on this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Can't you just override the hard coded remote urls at runtime with runtime plugin so system can statically analyze it? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Question: How to Enable Live Reload with Runtime Remote Registration in Module Federation?
Context
I'm building a microfrontend architecture using Module Federation with runtime remote registration (not static). I need live reload to work when remote applications change during development.
Current Setup
Host Application (
web-nexus)Remote Microfrontends
auth-microfrontend (port 3001):
cloud-microfrontend (port 3003):
Runtime Loading Pattern
The Problem
When I change code in a remote application (e.g.,
auth-microfrontend), the host application (web-nexus) does not automatically reload.mf-manifest.json) updatesWhy I Need Runtime Registration (Not Static)
I specifically don't want to register remotes statically like this:
Reasons:
What I've Tried
Enabling manifest in remotes ✅
manifest: trueWriting to disk during dev ✅
Module Federation Enhanced runtime API ✅
@module-federation/enhanced/runtimeinit()andloadRemote()work correctlyThe Question
How can I enable live reload in the host application when remote microfrontends change, while keeping runtime remote registration?
Specifically:
auth-microfrontendcode changes →web-nexusshould reload/hot-reloadcloud-microfrontendcode changes →web-nexusshould reload/hot-reloadEnvironment Details
@module-federation/rsbuild-plugin+@module-federation/enhancedExpected Behavior
Current Behavior
Cmd+R)Possible Approaches?
I'm not sure which approach is best:
Any guidance or examples would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions