antd中按需加载使用react-app-rewired报错

【描述】

按照antd官网步骤 https://ant.design/docs/react/use-with-create-react-app-cn

最后yarn start会报错

【解决方法】

原因是react-scripts 升级到 2.1.2 以后破坏了 react-app-rewired

解决方法,对react-scripts进行降级处理

yarn add react-app-rewired@2.0.2-next.0

 

参考:

https://blog.csdn.net/weixin_39836173/article/details/86110011

 

https://www.cnblogs.com/mmykdbc/p/10255814.html

posted @ 2019-01-12 14:00  remly  阅读(1443)  评论(0编辑  收藏  举报