Skip to content

Commit

Permalink
fix: clear globalLoading cache in node env (#3173)
Browse files Browse the repository at this point in the history
  • Loading branch information
2heal1 authored Nov 7, 2024
1 parent 5fc6045 commit 66ba7b1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/beige-cheetahs-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@module-federation/runtime': patch
'@module-federation/node': patch
---

fix: clear globalLoading cache in node env
1 change: 0 additions & 1 deletion packages/node/src/utils/hot-reload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ export const performReload = async (
gs.entryChunkCache.clear();
}

gs.__GLOBAL_LOADING_REMOTE_ENTRY__ = {};
//@ts-ignore
gs.__FEDERATION__.__INSTANCES__.map((i: any) => {
//@ts-ignore
Expand Down
4 changes: 4 additions & 0 deletions packages/runtime/src/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ export function resetFederationGlobalInfo(): void {
CurrentGlobal.__FEDERATION__.moduleInfo = {};
CurrentGlobal.__FEDERATION__.__SHARE__ = {};
CurrentGlobal.__FEDERATION__.__MANIFEST_LOADING__ = {};

Object.keys(globalLoading).forEach((key) => {
delete globalLoading[key];
});
}

export function getGlobalFederationInstance(
Expand Down

0 comments on commit 66ba7b1

Please sign in to comment.