patrickhulce / fontmin-webpack

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

Ability to specify the webpack compilation hook and the textRegex as parameters #61

Closed eltorio closed 2 years ago

eltorio commented 2 years ago

Dear Patrick, First thanks a lot for your work. I forked for adapting it to my use. I use it with Vue3 and Purgecss-webpack-plugin.

For having all working together it needs to be run after purgecss-webpack-plugin. But:

//purgecss-webpack-plugin
compiler.hooks.compilation
//fontmin-webpack
compiler.hooks.thisCompilation

So I added a parameter to yours for specifying the hook, default is the old value

Vue can have css in .vue files so I added another parameter for specifying the textRegex. defaulting to the old value. Ronan

eltorio commented 2 years ago

Sample added to README.md