patrickhulce / fontmin-webpack

Minifies icon fonts to just the used glyphs.
MIT License
139 stars 19 forks source link

fix matching asset filenames containing querystring #59

Closed ArTiSTiX closed 2 years ago

ArTiSTiX commented 2 years ago

Fixes https://github.com/patrickhulce/fontmin-webpack/issues/57

Assets can potentially have querystrings, messing up with the FONT_REGEX not detecting fonts. We allow querystrings in filename, and strip the querystring part anywhere we need to check extension (path package does not handle querystrings).

NOTE: If you have suggestions to improve this, let me know, i did not want to change too much the existing logic, but it's a blocker on my project.