The --json option (e.g. encore production --json) is useful for visualizing your assets: https://chrisbateman.github.io/webpack-visualizer/
There are at least 2 things that Encore currently breaks:
1) We dump some output, which breaks the JSON
2) We silence a bunch of output, which the visualizer expects
I played a bit with that, ignoring the whole assetOutputDisplay/friendlyErrorPlugin thing, using default output options and removing some extra console.log calls when Encore is called with the --json (or -j) option.
It works well if you directly call ./node_modules/.bin/encore but not if you use the yarn run wrapper :(
Using ./node_modules/.bin/encore production --json:

Using yarn encore production --json (or yarn run encore production --json):

I'm not sure how to remove these extraneous lines...
So, I don't think that we can do much on our side about these lines but they can be disabled using the --silent CLI option (doesn't seem to be documented yet on yarn website though).
Note that it has to be placed before the script name in order to avoid Webpack throwing an Unknown argument error, for instance:
// Doesn't work
yarn run encore production --silent --json
// Works
yarn run --silent encore production --json
When this PR can be merged?
Just released 0.17.1 with this fix :)
Most helpful comment
Just released 0.17.1 with this fix :)