-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot mute [HMR] Waiting for update signal from WDS...
in browser console
#2932
Comments
I guess it wouldn't make sense for the hot chunk to wait for anything from webpack-dev-server client before logging since the whole purpose of this log is that inform that it's waiting for that. Maybe simply adding a timeout and changing the log to something like |
We should run this https://github.com/webpack/webpack/blob/911ec1aa67011e25aa1449610f5b0b557edd5459/hot/log.js#L45, no need to timeouts or other unnecessary hacks |
I'm not sure to understand how that would solve the issue? Until you receive the socket command, you don't know what's the actual logging configuration so you would need a default value. If that default value isn't |
You can use |
|
We can't because it is part of webpack, not webpack-dev-server. I have an idea (we can pass options from webpack to client entry, like we do for web socket host/port/etc, set level and avoid sending unnecessary web socket message, I think it will be easy to solve), but this is not high priority, you can send a PR if you need it in the next release |
Operating System: macOS 11.1
Node Version: v14.12.0
NPM Version: v6.14.8
webpack Version: v5.10.1
webpack-dev-server Version: 4.0.0-beta.0
Browser: Chrome & Safari
This is a bug
This is a modification request
Code
Expected Behavior
Setting client logging to
none
should suppress completely all client log, including from the hot chunk.Actual Behavior
The log
[HMR] Waiting for update signal from WDS...
is still outputted to browser console when loading the page.For Bugs; How can we reproduce the behavior?
Simply start webpack-dev-server with any kind of configuration (just don't pass
hot: false
), and check the browser console when the page has loaded.From what I understood, that's because the default logging level of the hot chunk is
info
, and it is overwritten by webpack-dev-server client by calling the exportedsetLogLevel
function.But that function is only called once the webpack-dev-server client receives a
logging
command that is send when creating the socket server. That only happens after the web server has been started and is listening.That specific logging happens as soon as the hot chunk is loaded, which is before the webpack-dev-server client receives that
logging
command from the socket server.I don't have enough context to know which would be the best way to solve this, but let's start a discussion about it in here.
The text was updated successfully, but these errors were encountered: