我正在尝试使用 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")],
}
});
}