-
Notifications
You must be signed in to change notification settings - Fork 214
Reduce verbosity of webpack compile output #1072
Conversation
Example log output using yarn buildBefore:
After:
yarn startBefore:
After:
yarn testBefore:
After:
Even more extreme is when building a project with multiple entrypoints and a large dependency graph (such as Treeherder): yarn buildBefore:
After:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making middleware changes in the neutrino package feels like a violation of separation of concerns since it does nothing else to force middleware that I can remember. I'm willing to be convinced otherwise, but I feel like we should duplicate this into the lower level middleware like web and node.
packages/neutrino/index.js
Outdated
@@ -31,6 +31,13 @@ module.exports = (middleware = {}) => { | |||
neutrino.config.mode(mode); | |||
} | |||
|
|||
// The default output is too noisy, particularly with multiple entrypoints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like the wrong place to make this change. I know it's more duplication, but I would rather this lived in the middleware/presets instead of here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We set the mode
in the neutrino package, which is why I put this alongside that (though mode
is probably unavoidable given args handling).
I guess we'd only need to duplicate it three times (web/node/library).
This adjusts the console output to be less verbose, for parity with how it was prior to the switch to native CLIs in #852. In some cases the output has been made to be even more concise than in Neutrino 8, since it's now possible for users to adjust the output via CLI flags, therefore less important to satisfy all use-cases out of the box. For that reason the `debug` handling has also been removed. The output when using webpack-dev-server now includes the duration, which makes it much easier to compare incremental build times. The `performance.hints(false)` of `@neutrinojs/node` has been removed since it's redundant as of webpack 4.2.0: webpack/webpack@c65fb74 Fixes #897.
PR updated :-) On a separate note, I think #635 would be a great idea - we can just switch to using Jest snapshots for the sanity-checking of the generated webpack config - will reduce the manual duplication. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent.
This adjusts the console output to be less verbose, for parity with how it was prior to the switch to native CLIs in #852.
In some cases the output has been made to be even more concise than in Neutrino 8, since it's now possible for users to adjust the output via CLI flags, therefore less important to satisfy all use-cases out of the box. For that reason the
debug
handling has also been removed.The output when using webpack-dev-server now includes the duration, which makes it much easier to compare incremental build times.
The
performance.hints(false)
of@neutrinojs/node
has been removed since it's redundant as of webpack 4.2.0:webpack/webpack@c65fb74
Fixes #897.