rohanray / next-fonts

Import fonts in Next.js (supports woff, woff2, eot, ttf, otf & svg)
179 stars 12 forks source link

Corrected stripped parameters for font version #32

Closed gabrielsebag closed 4 years ago

gabrielsebag commented 4 years ago

Using this library to import fontawesome led me to some issue. next-fonts removes all the url parameters in my file path when I call url() in my css file.

I couldn't import fontawesome because of that.

As you can see in this example repo : https://github.com/generalgmt/Andela/blob/master/font-awesome-4.1.0/css/font-awesome.css

We need to import the font using its version "../fonts/fontawesome-webfont.eot?v=4.1.0"

I edited next-fonts to keep "?v=X.X.X" in the newly created path.

rohanray commented 4 years ago

Thanks @gabrielsebag for the PR! I have published a new version on npm 1.3.0 for next-fonts which includes your PR. -RR