From 8c99e1a142d5fc893abfc18fae04be165089a345 Mon Sep 17 00:00:00 2001 From: unadlib Date: Thu, 5 Dec 2024 10:46:23 +0800 Subject: [PATCH] fix(builder): fix exposes check --- examples/basic/app1/site.config.json | 3 --- packages/builder/src/getConfig.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/basic/app1/site.config.json b/examples/basic/app1/site.config.json index 263882f..28ee61b 100644 --- a/examples/basic/app1/site.config.json +++ b/examples/basic/app1/site.config.json @@ -22,9 +22,6 @@ }, "@example/app3": "http://localhost:3003/remoteEntry.js" }, - "exposes": { - "./src/bootstrap": "./src/bootstrap" - }, "shared": { "react": { "singleton": true diff --git a/packages/builder/src/getConfig.ts b/packages/builder/src/getConfig.ts index 202f663..56c8435 100644 --- a/packages/builder/src/getConfig.ts +++ b/packages/builder/src/getConfig.ts @@ -86,7 +86,7 @@ export const getModuleFederationConfig = ( __DEV__ && (typeof exposes !== 'object' || !Object.keys(exposes).length) ) { - throw new Error(`'exposes' should set at least one of the exposed module.`); + console.warn(`'exposes' should set at least one of the exposed module.`); } if (__DEV__ && restConfig.remoteType) { console.warn(