umi 项目安装 antd-mobile v5 后报错如何解决?
2021-11-25 本文已影响0人
jack钱
在 umi 项目中引入 antd-mobile 时出现了类似下面这样的报错:
These dependencies were not found:
- antd-mobile/es/button in ./src/pages/home-my/index.tsx
- antd-mobile/es/button/style in ./src/pages/home-my/index.tsx
...
可以尝试在 config.js 中增加以下配置:
{
antd: { mobile: false }
}