-
-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to fetch updated remote module code (caching issue?) #3119
Comments
Oh... i know the reason . Because runtime will catch the loaded remoteEntry/manifest in GLOBAL_LOADING_REMOTE_ENTRY . And this attr not be cleared , okay I will expose clearRuntimeCache methods to revalidate |
Just an FYI that this doesn't seems to be the case at first glance. I am dumping the GLOBAL_LOADING_REMOTE_ENTRY and it seems to be empty before and after an init() + loadRemote(). Also, tried a performReload() and that didn't seem to do help either. It has the logic in there to clear GLOBAL_LOADING_REMOTE_ENTRY as well a clear the module cache. |
Let me know if you guys have any other ideas on why this isn't working |
Ahhhhh...that makes sense. I'll test when you guys are able to make this somehow trigger-able externally. |
@ScriptedAlchemy @2heal1 I am running into this same issue Here's a minimal reproducible example: https://github.com/MadaraUchiha-314/nailsmith For me the issue is with the Since my remote doesn't have a unique hash in the URL (which is a requirement for local development), it treats it as the same remote making hot reloading not work. When can we expect a fix for this ? Should I raise a PR ? |
@arimus @MadaraUchiha-314 Yeah , i will fix it next Wednesday by providing a clearCache api |
Describe the bug
I have a host and a remote. The initial init + fetch works great, when a changes is made to the remote that host detects it with revalidate(), but a subsequent init + fetch seems to get the old code still.
Host: built with webpack, dynamic loading of module, using revalidate() to poll for changes that require an init + reload
Remote: running with webpack dev server
I'm not sure how to ensure the latest version of the code is fetched / the appropriate caches are cleared / etc.
p.s. is there no way for the host to get the HMR updates and trigger a reload off of that instead of polling or is the lack of a browser environment a deal breaker atm?
Reproduction
https://github.com/arimus/dynamic-remotes-node
Used Package Manager
npm
System Info
Validations
The text was updated successfully, but these errors were encountered: