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进行降级处理

参考:

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

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

猜你喜欢

转载自www.cnblogs.com/remly/p/10259489.html