Skip to content

Commit

Permalink
refactor(plugins): check algorithm option for antd plugin (#11629)
Browse files Browse the repository at this point in the history
* chore: prompt when adding an incorrect configuration

Co-authored-by: xiaohuoni <[email protected]>

* chore: update

* chore: update

* Update packages/plugins/src/antd.ts

Co-authored-by: Peach <[email protected]>

---------

Co-authored-by: xiaohuoni <[email protected]>
Co-authored-by: Peach <[email protected]>
  • Loading branch information
3 people authored Sep 11, 2023
1 parent f3c9ed0 commit 8a0cd22
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/plugins/src/antd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8a0cd22

Please sign in to comment.