Once webpack-dev-server start, the console will output:
ℹ 「wds」: Project is running at https://127.0.0.1:3002/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from ...
However, I am not willing to display the above log to users, how to hide them?
For anyone coming here in regards to webpack-dev-server v4,
As per the v4 migration guide:
log, logLevel, logTime, quiet, noInfo, and reporter options were removed without replacement, now we use built-in logger.
So you need to add this to your Webpack config:
infrastructureLogging: {
level: 'error',
},
You can use:
devServer: {
client: {
logging: 'none'
}
}
doc: https://webpack.js.org/configuration/dev-server/#logging
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With