gdborton / webpack-parallel-uglify-plugin

A faster uglifyjs plugin.
466 stars 34 forks source link

"test" option #16

Closed tfoxy closed 7 years ago

tfoxy commented 7 years ago

Hi. I'm using this plugin and it works perfect. But I don't want to minify all the files. With UglifyJsPlugin I can provide a test option to filter files:

https://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin

I was wondering if you could add this option. By looking at the code it should be fairly easy:

https://github.com/gdborton/webpack-parallel-uglify-plugin/blob/7b3ecd96f63485d2b25315b2f26d9ae40a479404/lib/uglifier.js#L83

lencioni commented 7 years ago

Similarly, it would be great to support include and exclude. I'm not an expert, but I think this can be done now with ModuleFilenameHelpers. Example: https://github.com/webpack-contrib/uglifyjs-webpack-plugin/blob/aec6c50437ac36df8f82a49d13c6728413e1f7ab/src/index.js#L39

gdborton commented 7 years ago

I'm going to take a look at adding this ASAP, I've been in the middle of a refactor that I'd like to see go through first.

tfoxy commented 7 years ago

Added in #26 . Available in v0.4.2 .

Thanks @gdborton . Today I updated to webpack 2 and this worked perfect.