I have some troubles having my font efficient on vuejs, I have no errors at all, my fonts are in the good folder and my webpack config seems to be efficient.
By the way I use less but I also have the less-loader.
Here's how I do :
@font-face {
font-family: 'montserrat-extralight';
src: url('../assets/fonts/montserrat-ExtraLight.ttf') format('truetype');
font-family: 'montserrat-light';
src: url('../assets/fonts/montserrat-Light.ttf');
}
And here is where I define the url-loader in my webpack.config :
{
test: /\.(woff|woff2|otf|eot|ttf|svg)(\?.*$|$)/,
loader: 'url-loader?importLoaders=1&limit=100000'
}
I've found many people with the same problem, but I actualy can't find THE way to make it work.
PS : my font are not uploaded in the network tab within developper mode...

Your configuration seems ok, But try to remove limit param it may solve your problem, because a font file could very much outsize 100K.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With