patrickhulce / fontmin-webpack

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

Targeting Specific Font Files #29

Closed archy-bold closed 2 years ago

archy-bold commented 4 years ago

The script works great, but has the unfortunate side effect of running on every font I use in my CSS including regular type-faces.

Is it possible to target only specific font files? ie only font-awesome and not other fonts.

patrickhulce commented 4 years ago

Thanks for filing @archy-bold! Not currently supported but it should be fairly simple to implement. Would you be interested in picking that up? :)

archy-bold commented 4 years ago

I'll add it to my to do list :)

Is there a usual webpack standard for that sort of thing? Using a regex to string/regex to match files?

patrickhulce commented 4 years ago

Hm not a standard perse but convention would suggest a regex option for the file names to match.

Maybe allowedFilesRegex and skippedFilesRegex for inclusive and exclusive matching?

Moustachos commented 2 years ago

@patrickhulce when you got time to check it, I made a pull request addressing this issue and #5 :)