Do you want to request a feature or report a bug?
What is the current behavior?
When running webpack with
--profile --json flags, and the JSON data to be output is rather big, it fails with this error:
process.stdout.write(JSON.stringify(stats.toJson(outputOptions), null, 2) + "\n"); ^ RangeError: Invalid string length at join (native) at Object.stringify (native) at compilerCallback (/home/simon/dev/otrl/booking-engine/node_modules/webpack/bin/webpack.js:337:30)
If the current behavior is a bug, please provide the steps to reproduce.
Well, I guess you need a project with enough entry points, and a complicated enough module graph that the size of the profile is quite large. I will try to create a reproducible repo, but actually this is demonstrable with node & no dependencies:
What is the expected behavior?
The JSON should be output to
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
- node v6.10.0
- webpack 2.3.3
- Ubuntu 16.04.1 LTS