I'm not sure if this is already supported, but right now the logging levels of webpack-dev-server are either lots and lots or none at all.
What I mean is, on startup and whenever changes are detected, hundreds (thousands maybe?) of lines are output to the console (i'm using the API not the CLI). The problem with this is it pushes useful app code originated logging lines out of the console scroll buffer.
I tried using the noInfo option and what happens is that there is nothing logged from webpack-dev-server at all.
What I would like to see is just the
webpack: bundle is now INVALID.
webpack: bundle is now VALID.
lines and also any errors that occurred and nothing more, so I know that webpack has detected changes and finished processing them.
Yep. At the current state of webpack it's time to define different log levels... but this is an issue of webpack (webpack/webpack#476).
Close this one?
My config:
// It suppress error shown in console, so it has to be set to false.
quiet: false,
// It suppress everything except error, so it has to be set to false as well
// to see success build.
noInfo: false,
stats: {
// Config for minimal console.log mess.
assets: false,
colors: true,
version: false,
hash: false,
timings: false,
chunks: false,
chunkModules: false
}
The example config @steida gave is very helpful. That seems more or less the requested behavior (in lieu of something like logging levels). Perhaps this is just a documentation bug to explain the stats options better?
@maspwr Feel free to copy/past from or into https://github.com/steida/este
@steida Very cool. Thanks for the link!
Just verifying @steida, what you provided isn't supposed to work today right? You were just suggesting that as an API. I just tried it and it didn't work for me, so that's why I'm just checking that I'm not missing anything...
@steida Thank you, this is exactly what I was looking for.
@kentcdodds The stats config definitely works for me. My frontend scaffold is a lightweight example (webpack version 1.10.1).
I think using the stats config is the correct solution, it worked for me and there are lots of options to choose what to show or not. Thank you very much @steida. Closing this issue.
Where is the stats config option documented? If it's not documented, is there in issue for the missing documentation?
Sorry for commenting on an old thread.
If others end up here looking for a way to show the startup url on webpack-dev-server initialization (e.g. localhost:3000) but not have a mess in the console this config worked for me:
stats: {
all: false,
// Show the url we're serving at
wds: true,
// Config for minimal console.log mess.
assets: false,
colors: true,
version: false,
hash: false,
timings: false,
chunks: false,
chunkModules: false,
},
The wds key is not documented so far as I can tell.
Most helpful comment
My config: