assets-webpack-plugin icon indicating copy to clipboard operation
assets-webpack-plugin copied to clipboard

Add option to filter assets

Open jakebellacera opened this issue 5 years ago • 1 comments

It'd be nice to exclude assets based off of filename, path, etc. For instance, we don't need to include assets from CSS into the manifest.

Describe the solution you'd like An option to filter assets based off of path, name, etc:

new AssetsPlugin({
  exclude: ({ path }) => /src\/scss/.test(path)
});

jakebellacera avatar May 10 '19 23:05 jakebellacera

For now you could use the fileTypes option, but I agree that having some kind of regex match would be a nice feature. Thanks for the suggestion.

ztoben avatar May 13 '19 12:05 ztoben