How to disable logs in webpack?

Member

by jerad , in category: Javascript , 5 months ago

How to disable logs in webpack?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by darion , 5 months ago

@jerad 

To disable logs in webpack, you can use the stats configuration option in your webpack configuration file. Here's an example:

1
2
3
4
5
6
module.exports = {
  // other webpack configuration options
  
  // disable logs
  stats: 'none'
};


Setting the stats option to 'none' will disable all logs in the webpack output. You can also customize the level of logging by setting stats to other values such as 'normal', 'verbose', etc.


You can find more information about different logging options in the webpack documentation: https://webpack.js.org/configuration/stats/