Send console output to STDERR?
The plugin appears to send all its logs to STDOUT rather than STDERR (ie. as it would using console.error). This breaks webpack --json > stats.json. Is there any support for changing the log messages to STDERR?
Technical info
- Webpack Bundle Analyzer version: 3.0.3
- Webpack version: 4.28.0
- Node.js version: 10
- OS: OSX
Debug info
How do you use this module? As CLI utility or as plugin? As a plugin
If CLI, what command was used? (e.g. webpack-bundle-analyzer -O path/to/stats.json)
If plugin, what options were provided? (e.g. new BundleAnalyzerPlugin({ analyzerMode: 'disabled', generateStatsFile: true }))
What other Webpack plugins were used? None
Ah yes, I think I once tried to move all to stdout but I never completed my work.
What do you think, @th0r? Should we move all debug and warning/error logs to STDERR so that piping commands works in *nix?
I don't think using console.error for all types of messages is a good solution here. Can we understand somehow that webpack is being run in --json mode? What does other plugins do in this case?