Copy-webpack-plugin: Is it possible to tell copy-webpack-plugin to be less verbose ?

Created on 25 Jan 2017  路  5Comments  路  Source: webpack-contrib/copy-webpack-plugin

Because if I copy 2000 files, its going to console.log them all in the assets table of webpack.

Most helpful comment

With the new version of webpack you can filter the log by doing something like this:

stats : {
    assets : true,
    excludeAssets : [/.*vendor\/.*/ , /.*assets\/.*/],
  }

More info in the docs.

All 5 comments

Guys, is there some answer please?

@alerkesi You could add stats: { assets: false } to your webpack configuration to silence the list of files. The downside is it will hide all assets rather than just the ones copied by this plugin.

If you want to selectively log assets, it seems like that would have to be a new feature added to webpack itself. You could also get tricky and use the webpack node API to run webpack, grab the stats string, and filter it before outputting.

With the new version of webpack you can filter the log by doing something like this:

stats : {
    assets : true,
    excludeAssets : [/.*vendor\/.*/ , /.*assets\/.*/],
  }

More info in the docs.

@Predjo 's solution worked for me. This issue should be closed as Resolved.

It's in the docs, but if anybody else here failed to click through initially and was disappointed that this "didn't work", be aware that devServer gets its own copy of this config item. If you want to thin out your console output in dev mode, you'll need stats: { ... } there too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ietabhi picture ietabhi  路  5Comments

alex88 picture alex88  路  4Comments

alexprice1 picture alexprice1  路  5Comments

stq picture stq  路  5Comments

kimgysen picture kimgysen  路  3Comments