Skip to content

Commit

Permalink
Bypass Webpack Dev Server startup info logging which ignores the quie…
Browse files Browse the repository at this point in the history
…t option
  • Loading branch information
insin committed Mar 12, 2020
1 parent 02d565a commit 63a1eb5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Unreleased (in `master`)

## Changed

- Added a temporary hack to bypass [startup info logging](https://github.com/webpack/webpack-dev-server/blob/50c09a4b64c013cca0acb6013bdaa28d0f342149/lib/utils/status.js#L9-L16) Webpack Dev Server currently does even when its `quiet` option is set.

# 0.24.2 / 2020-03-12

## Fixed
Expand Down
6 changes: 6 additions & 0 deletions src/devServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ export default function devServer(webpackConfig, serverConfig, url, cb) {
debug('webpack dev server options: %s', deepToString(webpackDevServerOptions))

let server = new WebpackDevServer(compiler, webpackDevServerOptions)

// XXX Temporarily replace console.info() to prevent WDS startup logging which
// is explicitly done at the info level when the quiet option is set.
let info = console.info
console.info = () => {}
server.listen(port, host, (err) => {
console.info = info
if (err) return cb(err)
if (open) {
// --open
Expand Down

0 comments on commit 63a1eb5

Please sign in to comment.