From 44e21a3da28d71e0d28d26f743a3d48d387fc12b Mon Sep 17 00:00:00 2001 From: liaohainan Date: Mon, 6 Jun 2022 02:00:32 +0800 Subject: [PATCH] :loud_sound: add same name register warn log --- src/apis.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/apis.ts b/src/apis.ts index e3758ba3b..6a5d0b401 100644 --- a/src/apis.ts +++ b/src/apis.ts @@ -73,6 +73,13 @@ export function registerMicroApps( customProps: props, }); }); + + // only show same name warn info + apps.forEach((app) => { + if (microApps.some((registeredApp) => registeredApp.name === app.name)) { + console.warn(`Each app only needs to be registered once by ${app.name}`); + } + }); } const appConfigPromiseGetterMap = new Map>();