When webpack is running, how can you prevent the console from displaying these messages?

Jun.29,2021

add stats: "none" to webpack.config.js;

View the document


stats: {
chunks: false, / / do not add chunk information
colors: true,
modules: false, / / do not add building module information

}


has finally solved this problem after searching for it for a long time. On my side, I use webpack-dev-middleware to build the development environment. Adding options to stats: 'errors-only' will not output this information.

    var compiler = webpack(webpackConfig);
    var devMiddleware = require('webpack-dev-middleware')(compiler, {
      publicPath: '/',
      stats: 'errors-only', // 
      quiet: true //turn off errors to work with friendly-errors-webpack-plugin
    });
The

stats option gives you more precise control over how bundle information is displayed. If you do not want to use quiet or noInfo , but do not want to get all the information, but just want to get some bundle information, use the stats option is a better way

if you are using webpack-dev-server , this attribute should be placed in the devServer configuration object .
for webpack-dev-middleware , this attribute needs to be in the options object of webpack-dev-middleware.

reference link: idebar/Sidebar.jsx" rel=" nofollow noreferrer "> stats object-webpack

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1becea6-31b3a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1becea6-31b3a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?