webpack: [loader] Failed to decode downloaded font. OTS parsing error: invalid version tag
my config:
{ test: /\.eot/, loader: 'url-loader?limit=100000&mimetype=application/vnd.ms-fontobject' },
{ test: /\.woff2/, loader: 'url-loader?limit=100000&mimetype=application/font-woff2' },
{ test: /\.woff/, loader: 'url-loader?limit=100000&mimetype=application/font-woff' },
{ test: /\.ttf/, loader: 'url-loader?limit=100000&mimetype=application/font-ttf' }
chrome console:
Failed to decode downloaded font: data:application/font-woff2;base64,bW9kdWxlLmV4cG9ydHMgPSAiZGF0YTphcHBsaWNh…dXbXR0MlhlVWZrVDBjZUhZTHVWSFlCVFJoMU4waUtEeHE0bHd0L01NcWZUZS9IL1R1MzlYIg==
OTS parsing error: invalid version tag
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 28 (1 by maintainers)
I removed all other config and used this:
I hope this helps someone else too. remember: remove other font test configurations for fonts.
@Pushplaybang have u realized wuts going on ? me either having the same erros and still cant figure it out… 😦
Edit :
I come up with this. simply removed the loader and it worked.
I have to mention, my build is with Vue Cli 3 and applying this configuration on vue.config.js
Hope this helps. 🎉
Hello @isramv, on your snippet, I think there is a typo on
minetype
, shouldn’t bemimetype
?none of these solutions are working for me.
still getting the error 😃
I’d like to share the solution to my problem that’s fairly same as yours for those who google they way out here (like me).
Given my folder structure
The output css file was trying to import font files at the same folder level of it.
So it always hit 404
/css/font.x
and my server rendered 404 error was mistaken as a broken font. That’s whyFailed to decode downloaded font. OTS parsing error: invalid version tag
.The following snippet solved:
Now my font files are properly referenced within my css file.
Thank you. It works when the test is
/\.woff2(\?\S*)?$/
.Have you tried adding
$
s to the end oftest
? Liketest: /\.eot$/,
on all of them.woff
might get hit twice