RemoteEntry Caching Issue with RSBuild & Module Federation #3674
Unanswered
basit-qayoom
asked this question in
Q&A
Replies: 0 comments
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.
-
Packages I'm using:
❓ Problem
I’m using RSBuild with Module Federation in both the host and remote apps (React or NextJS - based).
When running the shell (host), the remoteEntry.js from the remote application is getting cached aggressively, even though I’m appending a query param to bust the cache.
✅ What I Tried
From remote config:
From shell (host) config:
Even though remoteEntry.js has a dynamic query parameter (v=${Date.now()}), the file is still cached by the browser. The only way the new version is picked up is if I redeploy the remote application.
In my case:
• Remote A internally calls Remote B and C.
• To avoid caching, if I redeploy Remote A, I also need to redeploy B and C.
• This becomes unmanageable across teams and environments.
⸻
🔍 Question
How can I effectively bust the cache for remoteEntry.js without requiring redeployment of all related remotes (B, C) when Remote A is deployed?
Is there a recommended pattern or setting in @module-federation/enhanced or RSBuild that allows for better cache busting—perhaps using hashed filenames or content-based versioning?
Any help or best practice would be appreciated 🙏
Beta Was this translation helpful? Give feedback.
All reactions