title: Dev dependencies for building an Angular 6 app
body: <p>My team has recently begun building an Angular 6 application and we are relatively new to the modern JavaScript framework world. </p>
  
  <p>Our CI builds are currently using the Angular CLI to <a href="https://stackoverflow.com/questions/37631098/how-to-bundle-an-angular-app-for-production?rq=1">build the app</a> with the <a href="https://github.com/angular/angular-cli/wiki/build" rel="nofollow noreferrer">configuration flag set to production</a>: <code>ng build -c production</code></p>
  
  <p>Before the build, however, our build engineer wants to install <em>just the necessary dependencies</em> and NOT include the items in the devDependencies section of the package.json file... but libraries required to perform the build are only in the devDependencies section. The command he's using is <code>yarn install --production</code>. Again this <a href="https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-production-true-false" rel="nofollow noreferrer">ignores dependencies in devDependencies</a>.</p>
  
  <p>My question is this: <strong>when building an Angular 6 app for production, should we</strong>:</p>
  
  <ul>
  <li>use the Angular CLI, but move the build dependencies from devDependencies to the nominal dependencies section?</li>
  <li>don't use the Angular CLI, leave the dependencies as they are, and do something entirely separate</li>
  </ul>