WARNING Compiled with 8 warnings 上午10:50:54
warning in ./src/.umi/plugin-layout/layout/layout/renderRightContent.tsx
"export 'SelectLang' was not found in 'umi'
warning in ./src/.umi/plugin-layout/layout/layout/renderRightContent.tsx
"export 'SelectLang' was not found in 'umi'
warning in ./src/.umi/plugin-layout/layout/utils/intl.ts
"export 'getLocale' was not found in 'umi'
warning in ./src/.umi/plugin-layout/layout/layout/index.tsx
"export 'useIntl' was not found in 'umi'
warning in ./src/.umi/plugin-layout/layout/layout/index.tsx
"export 'useIntl' was not found in 'umi'
warning in ./src/.umi/plugin-layout/layout/utils/intl.ts
"export 'useIntl' was not found in 'umi'

修改config.ts 移除国际化代码

看起来是 https://github.com/umijs/plugin-layout 的问题,好像没人维护的样子😂
删除了国际化要顺便把 locale 设置为false,然后重启一下项目,会重新生成这个dom
删除了国际化要顺便把 locale 设置为false,然后重启一下项目,会重新生成这个dom
没有用

我也遇到了这个问题
删除了国际化要顺便把 locale 设置为false,然后重启一下项目,会重新生成这个dom
这个删除了后不生效,需要怎么改吗
The same question.
遇到同样的问题,按照官网新建项目,dev启动就有一堆warning
我也遇到了同样的问题:
WARNING Compiled with 5 warnings 5:27:27 ├F10: PM┤
warning in ./src/.umi/plugin-layout/layout/layout/renderRightContent.tsx
"export 'SelectLang' was not found in 'umi'
warning in ./src/.umi/plugin-layout/layout/layout/renderRightContent.tsx
"export 'SelectLang' was not found in 'umi'
warning in ./src/.umi/plugin-layout/layout/utils/intl.ts
"export 'getIntl' was not found in 'umi'
warning in ./src/.umi/plugin-layout/layout/utils/intl.ts
"export 'getIntl' was not found in 'umi'
warning in ./src/.umi/plugin-layout/layout/utils/intl.ts
"export 'getLocale' was not found in 'umi'
👪 现在先忽略吧,都是 warning,要解决的需要很大的成本。有人有兴趣提个 pr 吗?
config/config.ts 中增加 locale: {}src/locales/zh-CN.ts ,文件中写 export default {}当前版本 "umi": "^3.2.22"
config/config.ts中增加locale: {}- 新建文件
src/locales/zh-CN.ts,文件中写export default {}- 重启服务
当前版本
"umi": "^3.2.22"
IT WORKS REALLY.
config/config.ts中增加locale: {}- 新建文件
src/locales/zh-CN.ts,文件中写export default {}- 重启服务
当前版本
"umi": "^3.2.22"
It worked to me, thanks.
Most helpful comment
config/config.ts中增加locale: {}src/locales/zh-CN.ts,文件中写export default {}当前版本
"umi": "^3.2.22"