antd:离线图标无法加载

按照官网使用create-react-app创建项目后,下载了图标到本地,设置了iconfont:

config = rewireLess(config, env, {

    modifyVars: { "@icon-url": '"/src/assets/fonts/iconfont"' },

  });

然后启动项目,发现图标无法加载,报错:

Failed to decode downloaded font: http://localhost:3000/src/assets/fonts/iconfont.woff

localhost/:1 OTS parsing error: invalid version tag

localhost/:1 Failed to decode downloaded font: http://localhost:3000/src/assets/fonts/iconfont.ttf

localhost/:1 OTS parsing error: invalid version tag

网上找了很多方法都无法解决,url-loader也配置了,有大神知道解决方法么

慕斯709654
浏览 365回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript