Open arimus opened 1 day ago
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.
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