patrickhulce / fontmin-webpack

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

Support url-loader #4

Closed patrickhulce closed 7 years ago

patrickhulce commented 7 years ago

Would be nice to support data URI inlining of fonts instead of just file-loader, especially since fonts become much smaller when using fontmin.

goloroden commented 7 years ago

Any update on this?

patrickhulce commented 7 years ago

I haven't made any progress here, but I'll take another look when I have some spare cycles now that there's a customer :)

patrickhulce commented 7 years ago

Just an update on this, I got a hacky version working, but it's fairly brittle and not nearly as drop-in as the current configuration.

On second thought, it's also probably a bad idea to inline any font other than a very small woff/woff2. The file size increase from base64, the prevalence of h2, and the likelihood of misuse for inlining multiple unnecessary copies makes me inclined to label as a won't fix. If anyone has a strong argument for inlining, I'm definitely open to hearing it though :)