diff --git a/src/ModuleFederation.tsx b/src/ModuleFederation.tsx index a7eea7f..bce8519 100644 --- a/src/ModuleFederation.tsx +++ b/src/ModuleFederation.tsx @@ -235,8 +235,13 @@ const createShellAlertsStore = () => { }; }; -window.shellHooksStore = createShellHooksStore(); -window.shellAlertsStore = createShellAlertsStore(); +if (!window.shellHooksStore) { + window.shellHooksStore = createShellHooksStore(); +} + +if (!window.shellAlertsStore) { + window.shellAlertsStore = createShellAlertsStore(); +} export const shellHooksStore = window.shellHooksStore; export const shellAlertsStore = window.shellAlertsStore;