RemoteEntry Caching Issue with RSBuild & Module Federation #19401
Replies: 1 comment
-
|
Please ask this in |
Beta Was this translation helpful? Give feedback.
0 replies
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:
{ "@rsbuild/core": "1.1.0", "@rsbuild/plugin-react": "1.0.6", "@module-federation/rsbuild-plugin": "0.7.0", "@module-federation/enhanced": "0.7.0" }❓ Problem
I’m using RSBuild with Module Federation in both host and remote React applications.
I have the following setup:
When I run the shell, the
remoteEntry.jsfiles from remotes (e.g., A, B, C) are getting cached, even though I'm appending query parameters (?v=${Date.now()}) to the filenames to try and bust the cache.✅ What I Tried
Remote config:
Host (shell) config:
Even with
?v=${Date.now()}in the URL, the browser still caches theremoteEntry.jsfiles, and the only way I’ve found to reflect the changes is to redeploy the remotes.But here’s where it becomes more complex:
Date.now()for its version and consumes Remote B and Remote C.remoteEntry.js?v=timestamp, it tries to fetch the latest versions of B and C.remoteEntry.js.❓ Question
@module-federation/enhancedplugin and RSBuild?This inter-dependency is getting hard to manage across teams.
Any guidance on how to make this setup more scalable and avoid unnecessary redeployments would be really helpful 🙏
Beta Was this translation helpful? Give feedback.
All reactions