如何退出所有webpack console.log输出?

问题描述 投票:0回答:1

这不起作用:

  config.stats = 'none'

  config.devServer = {
    stats: 'none'
  }

我得到此输出

output

javascript webpack webpack-dev-server
1个回答
0
投票

您可以考虑在Webpack配置中指定noInfo

module.exports = {
  //...
  devServer: {
    noInfo: true
  }
};

或者,当您使用CLI运行开发服务器时,可以将info标志设置为false:

webpack-dev-server --info=false

您可以通过here阅读更多有关各种Webpack选项的信息>

© www.soinside.com 2019 - 2024. All rights reserved.