From 8a0cd22094327d75e853bec2956cbb681c1195c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=A2?= Date: Mon, 11 Sep 2023 14:52:21 +0800 Subject: [PATCH] refactor(plugins): check algorithm option for antd plugin (#11629) * chore: prompt when adding an incorrect configuration Co-authored-by: xiaohuoni * chore: update * chore: update * Update packages/plugins/src/antd.ts Co-authored-by: Peach --------- Co-authored-by: xiaohuoni Co-authored-by: Peach --- packages/plugins/src/antd.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/plugins/src/antd.ts b/packages/plugins/src/antd.ts index 1cba61d5342e..1f26a70aebd4 100644 --- a/packages/plugins/src/antd.ts +++ b/packages/plugins/src/antd.ts @@ -140,6 +140,12 @@ export default (api: IApi) => { antd.configProvider.theme || {}, antd.theme, ); + + // https://github.com/umijs/umi/issues/11156 + assert( + !antd.configProvider.theme.algorithm, + `The 'algorithm' option only available for runtime config, please move it to the runtime plugin, see: https://umijs.org/docs/max/antd#运行时配置`, + ); } if (antd.appConfig) {