Dva引入antd报错 Module not found: Can‘t resolve ‘antd/es/button/style/css‘ in 项目路径

Dva中根本不需要单独引入antd/es/button/style/css
.webpackrc中写的够明白了

这个其实是个版本问题
最新的antd可能存在一些语法兼容的问题

在终端执行

npm uninstall antd

将原来的依赖给他干掉
然后执行

npm  install antd@^4.24.2 --save

然后再次运行项目 这个问题就解决了

猜你喜欢

转载自blog.csdn.net/weixin_45966674/article/details/131553349