title: Configuration 'production' could not be found in project 'my-lib'
body: <p>I am building a library with Angular 6.1.0</p>
  
  <ul>
  <li><code>ng new lib-demo</code></li>
  <li><code>ng generate library my-lib</code></li>
  </ul>
  
  <p>All the articles advise running the build for the library with a <code>--prod</code> flag like so:</p>
  
  <pre><code>ng build my-lib --prod
  </code></pre>
  
  <p>However, this throws an error </p>
  
  <pre><code>Configuration 'production' could not be found in project 'my-lib'.
  </code></pre>
  
  <p>Which is probably correct because when I look at the <strong>angular.json</strong> there is no definition for a <code>production build configuration</code> in the library project. It is present for the application project only. </p>
  
  <p>the following is what I have under the build configuration for library project that uses <code>ng-packagr</code></p>
  
  <pre><code>"build": {
        "builder": "@angular-devkit/build-ng-packagr:build",
        "options": {
          "tsConfig": "projects/my-lib/tsconfig.lib.json",
          "project": "projects/my-lib/ng-package.json"
        }
      }
  </code></pre>
  
  <p>So the question here is that is the <code>--prod</code> flag not required anymore and just running <code>ng build m-lib</code> will generate a prod build? </p>
  
  <p>Looking at the contents of dist folder it looks so but I am not 100% sure. If someone could validate this, it will be great.</p>