title: Angular 6 build with --stats-json not generating stats.json file
body: <p>I'm trying to generate the stats.json file for my Angular 6 application. Below things I've already tried, but the file is not getting generated at all. My system requires to have <strong>"npm run"</strong> before every angular cli command.</p>
  
  <ol>
  <li><p>I've ran <strong>"npm run ng build --prod --stats-json"</strong> as well as <strong>"npm run ng build --prod --stats-json=true"</strong>.</p></li>
  <li><p>I've ran <strong>"npm run ng build --stats-json"</strong> as well as <strong>"npm run ng build --stats-json=true"</strong> (without the build command).</p></li>
  <li><p>Used <strong>"npm run ng build --statsJson=true"</strong> by taking reference from cli documentation.</p></li>
  </ol>
  
  <p>But still stats.json file is not being generated, which I want to read using webpack bundle analyzer.
  Any help, suggestion or correction in this regard is welcome.</p>
  
  <p>Below are the scripts in my package.json.</p>
  
  <p>"scripts": {</p>
  
  <pre><code>"ng": "ng",
  "start": "ng serve",
  "build": "ng build",
  "test": "ng test",
  "lint": "ng lint",
  "e2e": "ng e2e",
  "gulp": "gulp",
  "bundle-report": "webpack-bundle-analyzer dist/stats.json",
  "stats": "webpack-bundle-analyzer dist/stats.json"
  </code></pre>
  
  <p>},</p>