- Operating System: mac OS Sierra 10.12.6
- Node Version: 6.11.1
- NPM Version: 3.10.10
- webpack Version: 4.19.0
- webpack-dev-server Version: 3.1.8
Code
webpack.config_.dev_.js
//...
devServer: {
host: '0.0.0.0',
port: WEBPACK_PORT,
watchOptions: {
aggregateTimeout: 300,
poll: true
},
stats: {
assets: false,
children: false,
colors: true,
version: false,
hash: false,
timings: true,
chunks: false,
chunkModules: false,
warningsFilter: '[mini-css-extract-plugin]'
},
headers: {
'Access-Control-Allow-Origin': '*'
}
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 from stats.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 for stats.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:
[webpack] ℹ 「wdm」: Compiled with warnings.
However, I am still getting my warnings in the browser's console:

Which is originating from
|
log.warn('[WDS] Warnings while compiling.'); |
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!
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.warningsFilterin my configuration, then it would be respected by webpack-dev-server, and that errors of anything fromstats.warningsFilterwould 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.colorsfrom the same file.Note: I am certain that my stats are connected correctly, because setting my
stats.colorsto 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!