This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
Improve stringified config output by --inspect #928
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This takes advantage of the new webpack-chain
toString()
added in neutrinojs/webpack-chain#53.The output from
neutrino --inspect
now lists the correct plugin declarations and arguments, annotates plugins/loaders with hints about how to reference them in a custom Neutrino config, and supports using__expression
to override the stringified output when needed.The usage of
deep-sort-object
has been removed since it breaks the newtoString()
comment annotations, and really if sorted output is considered important, it should be handled by webpack-chain itself.Example output for Treeherder's WIP Neutrino 9 config:
https://emorley.pastebin.mozilla.org/9086982
After this merges, I was thinking we could backport this to Neutrino 8 under a separate flag (eg
--inspect-v9
) which would make it easier for people to diff Neutrino 8 and 9 configs.Fixes #328.
Refs #96.