按照官网使用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也配置了,有大神知道解决方法么
相关分类