Skip to content

Commit 66ba7b1

Browse files
authored
fix: clear globalLoading cache in node env (#3173)
1 parent 5fc6045 commit 66ba7b1

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.changeset/beige-cheetahs-tap.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@module-federation/runtime': patch
3+
'@module-federation/node': patch
4+
---
5+
6+
fix: clear globalLoading cache in node env

packages/node/src/utils/hot-reload.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ export const performReload = async (
153153
gs.entryChunkCache.clear();
154154
}
155155

156-
gs.__GLOBAL_LOADING_REMOTE_ENTRY__ = {};
157156
//@ts-ignore
158157
gs.__FEDERATION__.__INSTANCES__.map((i: any) => {
159158
//@ts-ignore

packages/runtime/src/global.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ export function resetFederationGlobalInfo(): void {
113113
CurrentGlobal.__FEDERATION__.moduleInfo = {};
114114
CurrentGlobal.__FEDERATION__.__SHARE__ = {};
115115
CurrentGlobal.__FEDERATION__.__MANIFEST_LOADING__ = {};
116+
117+
Object.keys(globalLoading).forEach((key) => {
118+
delete globalLoading[key];
119+
});
116120
}
117121

118122
export function getGlobalFederationInstance(

0 commit comments

Comments
 (0)