在umi中使用antd布局触发的警告“export ‘SelectLang‘ was not found in ‘umi‘“

时间:2024-03-22 08:25:24

今天看umi文档的时候,跟着文档教程一步一步走。
想在项目中使用antd布局,文档对应内容如下:
在umi中使用antd布局触发的警告“export ‘SelectLang‘ was not found in ‘umi‘“
于是我在项目中进行了如下的配置:
在umi中使用antd布局触发的警告“export ‘SelectLang‘ was not found in ‘umi‘“
该部分代码来源于umi文档的插件模块
在umi中使用antd布局触发的警告“export ‘SelectLang‘ was not found in ‘umi‘“
当我运行代码时,却触发了警告。
在umi中使用antd布局触发的警告“export ‘SelectLang‘ was not found in ‘umi‘“
因为上面的locale设置 为true。
为了解决这个问题,可以根据项目需求,如果不需要进行国际化设置为false即可。
需要进行国际化,添加@umijs/plugin-locale插件的配置。
在umi中使用antd布局触发的警告“export ‘SelectLang‘ was not found in ‘umi‘“
警告就可以消除。