Klathmon / imagemin-webpack-plugin

Plugin to compress images with imagemin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add option to setup regex to choice of certain assets

alexander-akait opened this issue · comments

Example, i am use favicons webpack plugins and i do not want to compress them, since it loses quality. Also, there are certain images that I want to compress the most strongly, others less strongly, and what that does not compress.

I love this idea and it will be really simple to implement. I can whip it up this morning.

It also has the additional side effect of working really well with webpack and you could easily add several instances of the plugin with different regexs and options to allow different optimization levels for each set.

@Klathmon That's what I planned to do, a few plugins for specific assets 😄 It will be fine if you have time for this implementation, thank you very much !

I should have it done in an hour or so and i'll ping you here when you can try it out.

@evilebottnawi just cut it as version 1.3.0

There will probably be a few minor version bumps today as I give this plugin some love, but nothing breaking.

@Klathmon what about use https://github.com/sindresorhus/multimatch package for support multiple patterns, sometimes in one directory we have difference files?

I'm actually looking into that (or something like it) right now!

@evilebottnawi

I just cut version 1.4.1 which now allows you to use a RegExp, glob, or an array of globs or RegExp objects as the test value.

I also redid the documentation, so let me know if something doesn't make any sense.