leftstick / unminified-webpack-plugin

Generator un-minified JavaScript files along with minimize.
MIT License
60 stars 7 forks source link

Option to include/exclude files #10

Closed johannes-z closed 7 years ago

johannes-z commented 7 years ago

How about an option that allows you to include or exclude files based on their name similar to the UglifyJsPlugin?

F.e. I'm building something like this:

var entry = {
  // Polyfill
  polyfill: ['babel-polyfill', 'whatwg-fetch'],
  // Source
  source: ['./src/main.js']
  // Other
}

I always want the polyfill file to be minified, and don't need the unminified version.

For the UglifyJsPlugin it would look like this:

new webpack.optimize.UglifyJsPlugin({
  include: /polyfill.*/,
  // ...
)}
leftstick commented 7 years ago

It's actually supported, i forget to add test cases and documentation. Thanks for reminding. Doc just updated.

Please check the readme