在 package.json 文件删除antd依赖。
在 https://www.jsdelivr.com/ 搜索antd得到js和css链接。
在 public/index.html ,放入js和css链接。
1 | ... |
然后在 src/index.js 中添加空白的导入语句
1 | import 'antd'; |
禁用依赖检查,在 package.json 文件中添加以下配置:
1 | "resolutions": { |
删除node_modules、yarn.lock,执行yarn install、yarn start即可。