Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

webpack extract text plugin prints a lot

Tags:

webpack

I am using the webpack extract text plugin to extract styles into a css file. It prints a lot of stuff like this:

Child extract-text-webpack-plugin: + 2 hidden modules

Child extract-text-webpack-plugin: + 7 hidden modules

Child extract-text-webpack-plugin: + 7 hidden modules

Child extract-text-webpack-plugin: + 2 hidden modules

Child extract-text-webpack-plugin: + 2 hidden modules

Child extract-text-webpack-plugin: + 4 hidden modules

Is there any way to surpress it via config? It's pretty useless and cramps the terminal window.

like image 609
kamilkp Avatar asked Mar 12 '23 15:03

kamilkp


2 Answers

Yes, it is possible to suppress messages from child plugins by adding { stats: { children: false } } option to your webpack config.

module.exports = {
  stats: {
    children: false
  }
};

There is an issue reported upstream regarding chatty behavior.

like image 146
Pavel Zubkou Avatar answered Mar 20 '23 01:03

Pavel Zubkou


The answer using stats suppresses output from all children, including everything if the config is an array.

Call webpack with --hide-modules at the command line instead.

like image 25
Adam Leggett Avatar answered Mar 20 '23 02:03

Adam Leggett