按照官网使用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.wofflocalhost/:1 OTS parsing error: invalid version taglocalhost/:1 Failed to decode downloaded font: http://localhost:3000/src/assets/fonts/iconfont.ttflocalhost/:1 OTS parsing error: invalid version tag网上找了很多方法都无法解决,url-loader也配置了,有大神知道解决方法么
添加回答
举报
0/150
提交
取消