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
Thank you. It works when the test is
/\.woff2(\?\S*)?$/
.I removed all other config and used this:
I hope this helps someone else too.
remember: remove other font test configurations for fonts.
Hello @isramv, on your snippet, I think there is a typo on
minetype
, shouldn’t bemimetype
?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
/ # root of web server css/ file-that-import-fonts.css fonts/ font-file.ext
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.
none of these solutions are working for me.
still getting the error 🙂
@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.🎉