項目antd版本號:"antd": "3.7.3",
antDesignPro版本:"name": "ant-design-pro", "version": "1.3.0",
解決辦法
安裝antd-iconfont
npm i antd-iconfont
npm run build
1.將node-modules里面的antd-iconfont放到static目錄下锻霎,文件夾命名iconfont,如下圖所示
image.png
2.在dist下css文件中搜索https://at.alicdn.com片仿,替換成iconfont里面的相對路徑礁凡,我這里有四處侣监,.eot .woff等
url("./static/iconfont/iconfont.eot");
url("./static/iconfont/iconfont.woff") format("woff"),
url("./static/iconfont/iconfont.ttf") format("truetype"),
url("./static/iconfont/iconfont.svg")
就醬局嘁,缺點是每次build都要修改dist文件
目前更簡便更合適的方法還沒找到川无。喇喉。。