webpack - Webpack-serve - 减少日志记录
问题描述
我正在尝试使用 webpack-serve 来支持 Elm 开发环境。我的问题是我收到了大量不需要的日志记录,这些日志记录将编译器消息迅速从屏幕上推出 - 参见图片。
我的 webpack.config.js 中有以下内容,两行标记为 **** 旨在减少噪音,但似乎没有任何成功。接下来我能做什么?
module.exports = merge(common, {
plugins: [
// Suggested for hot-loading
new webpack.NamedModulesPlugin(),
// Prevents compilation errors causing the hot loader to lose state
new webpack.NoEmitOnErrorsPlugin()
],
module: {
rules: [
{
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
use: [
{ loader: 'elm-hot-webpack-loader' },
{
loader: "elm-webpack-loader",
options: {
// add Elm's debug overlay to output
debug: true
}
}
]
}
]
},
serve: {
logLevel: "silent", *********
stats: "errors-only", *********
inline: true,
content: [path.join(__dirname, "src/assets")],
}
});
}
解决方案
推荐阅读
- mongodb - 使用 $slice 时使用数组长度
- python - 在 Python 3 中的字符串序列中包含转义序列
- openlayers-5 - 如何管理图层的显示顺序
- scala - 如何处理 JDBC ResultSet 迭代器中的异常
- javascript - Leaflet: Get inner-most layer on mouse click and mouse hover on intersecting rectangles
- flutter - 基于 SharedPreferences 设置 Scaffold ThemeData 的最佳方法
- swift - AVAudioSession setAggregatedIOPreference:错误:错误域=NSOSStatusErrorDomain 代码=560030580“(空)”
- reactjs - Do unused functions in a React Hook cause application bundle size issue?
- c# - Set image for Imagebutton in Xamarin for iOS
- java - 如何回滚 kafka 消费者轮询