webpack: cannot mute webpack/hot/dev-server console.logs
Do you want to request a feature or report a bug?
bug
What is the current behavior? Right now webpack/hot/dev-server/ spams my console, especially with multiple hot entry points (double spam).
[HMR] Waiting for update signal from WDS...
[HMR] Checking for updates on the server...
[HMR] Updated modules:
[HMR] - ../ng-cli/node_modules/css-loader/index.js!../ng-cli/node_modules/sass-loader/index.js!./src/assets/styles/main.scss
[HMR] App is up to date.
If the current behavior is a bug, please provide the steps to reproduce. Use HMR in one of the entry points and check browser console.
What is the expected behavior?
Selective console logs in browser. Values: none
, error
, warning
, info
.
Webpack-dev-server has a devServer.clientLogLevel option, implemented here. The problem is, webpack/hot/dev-server
should respect this option.
Files doing the spam:
- https://github.com/webpack/webpack/blob/master/hot/dev-server.js
- https://github.com/webpack/webpack/blob/master/hot/log-apply-result.js
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
win10/ubuntu 1604, node v7.4.0, npm v4.0.5, webpack-, webpack-dev-server v2.2.0
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 31
- Comments: 21 (7 by maintainers)
Would love this to get fixed. +1
It looks like you just deleted our lovely crafted issue template. It was there for good reasons. Please help us solving your issue by answering the questions asked in this template. I’m closing this. Please either update the issue with the template and reopen, or open a new issue.
Hey guys, is this ‘issue’ already resolved or is there already a way to allow certain log messages (like “updated modules”) but disable the “Checking for updates on the server” message?
My console is flooding with [HMR] logs 😥 (see attached image).
@sokra boo, im afraid i dont have th power to reopen the issue
updated the issue based on the template
for ppl who dont wanna wait just copy those 2 files, comment out the relevant console.logs and reference ur own
dev-server.js
, thats itMaybe better fix this problem in
webpack-dev-server
/webpack-dev-middleware
@esbenp fixed for some messages. Still getting
[HMR] Waiting for update signal from WDS...
If you’re using webpack-hot-middleware, you can configure it like this: webpack-hot-middleware/client?reload=true&noInfo=true
Another hacky temp solution for now in case you do not want to copy the needed files and reference them instead of webpack’s files (so you’ll still get updates in case they’ll come in future versions):
The above comments out all the
console.log
/console.info
(just change the regex as you wish) in the original webpack’s HMR files.