-
-
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
No respect, no respect at all! (for stats.warningsFilter 😉) #1557
Comments
@missalyss looks like a bug, feel free to investigate and send a PR |
@evilebottnawi to your knowledge, does your client have access to webpack config at all? I've been trying to send it from |
I have also encountered this problem, except the warnings are from a different loader (ts-loader). Setting a proper I found the root cause is browser console log is collected using a hard-coded stats option without consulting the stats option from config at all. See code at
Maybe we could fixed it by merging the hard-coded stats option with the one passed in constructor. |
Should be fixed, but we need add test for |
@evilebottnawi I'm making the PR... totally forgot about that test. |
@yoannmoinet will be great, thanks! |
Here you go @evilebottnawi #1732 |
Fixed #1732 |
@evilebottnawi Thanks! |
In near future |
Thx for this @yoannmoinet ! Can't wait to get it! |
Code
webpack.config_.dev_.js
Webpack config stats docs I'm going off of:
https://webpack.js.org/configuration/stats/#stats
WDS stats docs:
https://webpack.js.org/configuration/dev-server/#devserver-stats-
Expected Behavior
While using
stats.warningsFilter
in my configuration, then it would be respected by webpack-dev-server, and that errors of anything fromstats.warningsFilter
would be filtered out and not posted to my browser's console. The closest to addressing logging that I can find in your code is this line, or several other lines that check forstats.colors
from the same file.Note: I am certain that my stats are connected correctly, because setting my
stats.colors
to false turns the colors off.Actual Behavior
When adding
warningsFilter: '[mini-css-extract-plugin]'
to my config, errors from Webpack-Dev-Middleware are respected, and I no longer see them:However, I am still getting my warnings in the browser's console:
Which is originating from
webpack-dev-server/client-src/default/index.js
Line 145 in 55398b5
For Bugs; How can we reproduce the behavior?
Hmm I guess you'd need to set up a warning that you would try to filter out with your webpack config. Open browser console, errors persist with each page reload.
Note: when I update webpack-dev-server to latest version (3.1.10), problem still persists.
Thank you in advance!
The text was updated successfully, but these errors were encountered: