Skip to content

suppress or minimize webpack output in development logs #144

Closed
@zeke

Description

@zeke

The webpack setup logs a bunch of build info on local server startup. Maybe this output is useful, but I tend to never look at it. I noticed today that in some cases if there's an error in the app at startup, that error output can be scrolled offscreen by the webpack info, making it harder to notice:

~/git/github/docs-internal
$ npm start

> help.github.com@0.0.1 start /Users/z/git/github/docs-internal
> cross-env NODE_ENV=development ENABLED_LANGUAGES='en,ja' nodemon server.js

[nodemon] 2.0.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,json,yml,md,html,scss
[nodemon] starting `node server.js`
ENABLED_LANGUAGES: en,ja
TypeError: Cannot read property 'some' of undefined
    at /Users/z/git/github/docs-internal/lib/all-products.js:62:99
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/Users/z/git/github/docs-internal/lib/all-products.js:33:18)
    at Module._compile (internal/modules/cjs/loader.js:868:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:879:10)
    at Module.load (internal/modules/cjs/loader.js:731:32)
    at Function.Module._load (internal/modules/cjs/loader.js:644:12)
    at Module.require (internal/modules/cjs/loader.js:771:19)
    at require (internal/modules/cjs/helpers.js:68:18)
    at Object.<anonymous> (/Users/z/git/github/docs-internal/middleware/robots.js:2:18)
    at Module._compile (internal/modules/cjs/loader.js:868:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:879:10)
    at Module.load (internal/modules/cjs/loader.js:731:32)
    at Function.Module._load (internal/modules/cjs/loader.js:644:12)
    at Module.require (internal/modules/cjs/loader.js:771:19)
    at require (internal/modules/cjs/helpers.js:68:18)
ℹ 「wdm」: Hash: 64200700e0691a191700
Version: webpack 4.44.1
Time: 4328ms
Built at: 09/22/2020 9:51:02 PM
                   Asset      Size  Chunks             Chunk Names
   fonts/Inter-Bold.woff   140 KiB          [emitted]  
 fonts/Inter-Medium.woff   139 KiB          [emitted]  
fonts/Inter-Regular.woff   131 KiB          [emitted]  
               index.css   311 KiB    main  [emitted]  main
                index.js  2.03 MiB    main  [emitted]  main
Entrypoint main = index.css index.js
[./javascripts/deprecation-banner.js] 1.03 KiB {main} [built]
[./javascripts/display-platform-specific-content.js] 2.81 KiB {main} [built]
[./javascripts/experiment.js] 3.97 KiB {main} [built]
[./javascripts/explorer.js] 286 bytes {main} [built]
[./javascripts/google-analytics.js] 514 bytes {main} [built]
[./javascripts/helpfulness.js] 6.25 KiB {main} [built]
[./javascripts/index.js] 956 bytes {main} [built]
[./javascripts/localization.js] 248 bytes {main} [built]
[./javascripts/nav.js] 400 bytes {main} [built]
[./javascripts/print.js] 538 bytes {main} [built]
[./javascripts/search.js] 10.8 KiB {main} [built]
[./javascripts/sidebar.js] 2.73 KiB {main} [built]
[./javascripts/wrap-code-terms.js] 910 bytes {main} [built]
[./node_modules/browser-date-formatter/index.js] 901 bytes {main} [built]
[./stylesheets/index.scss] 39 bytes {main} [built]
    + 538 hidden modules
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--5-1!node_modules/resolve-url-loader/index.js??ref--5-2!node_modules/sass-loader/dist/cjs.js??ref--5-3!stylesheets/index.scss:
    Entrypoint mini-css-extract-plugin = *
    [./node_modules/css-loader/dist/cjs.js?!./node_modules/resolve-url-loader/index.js?!./node_modules/sass-loader/dist/cjs.js?!./stylesheets/index.scss] ./node_modules/css-loader/dist/cjs.js??ref--5-1!./node_modules/resolve-url-loader??ref--5-2!./node_modules/sass-loader/dist/cjs.js??ref--5-3!./stylesheets/index.scss 776 KiB {mini-css-extract-plugin} [built]
    [./node_modules/css-loader/dist/runtime/api.js] 2.46 KiB {mini-css-extract-plugin} [built]
ℹ 「wdm」: Compiled successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    engineeringWill involve Docs Engineering

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions