我正在进行assets预编译,并在生产模式下运行应用程序。编译后,当我加载我的索引页面时,我在chrome控制台中得到了以下警告:
Failed to decode downloaded font: http://localhost:3000/fonts/ionicons.ttf?v=2.0.0
prospects:1 OTS parsing error: invalid version tag
Failed to decode downloaded font: http://localhost:3000/fonts/ionicons.woff?v=2.0.0
prospects:1 OTS parsing error: invalid version tag
问题是它没有加载图标,而不是它显示的。
我们使用了自定义字体,代码是:
@font-face {
font-family: 'icomoon';
src: font-url('icomoon.eot');
src: font-url('icomoon.eot?#iefix') format('embedded-opentype'),
font-url('icomoon.ttf') format('truetype'),
font-url('icomoon.woff') format('woff'),
font-url('icomoon.svg#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
我不知道我这头到底少了什么。我搜索了很多,也尝试了解决方案,但没有得到任何success.In开发模式,它工作得很好,但不知道为什么它在生产模式中显示方形。
https://stackoverflow.com/questions/34288778
复制相似问题