Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make webpack less verbose?

This is Wes Craven's New Nightmare!

enter image description here

Why do I even need this horror on every little bit of change? How can I turn off these notifications?!

like image 456
Vitalii Korsakov Avatar asked Jun 19 '15 13:06

Vitalii Korsakov


People also ask

What does less loader do?

less-loader applies a Less plugin that passes all queries to the webpack resolver if less could not resolve @import . Thus you can import your Less modules from node_modules .

Does Webpack automatically minify?

Webpack v4+ will minify your code by default in production mode .

How do you get Webpack stats?

For simple Webpack projects you can generate a stats file using webpack --json > stats. json . This will create stats. json in your current directory with all the data from your project.


2 Answers

You can use Webpack CLI's --display option to set the verbosity of the stats output. Here are the available values.

E.g.

--display=minimal 
like image 199
LONGMAN Avatar answered Oct 23 '22 03:10

LONGMAN


You can add --quiet and --no-info to webpack-dev-server's command line: http://webpack.github.io/docs/webpack-dev-server.html#webpack-dev-server-cli

If you use webpack in watch mode, you can put | awk '{if ($0 !~ /^ *\[[0-9]*\]/) {print} else {if ($0 ~ /\[built\]/) {print}}}' after it, which will print all output except files that were not rebuilt.

like image 31
w00t Avatar answered Oct 23 '22 03:10

w00t