title: Is there a way to extend configurations in angular.json?
body: <p>While building my Angular 6 application, I need to specify 2 things at once:</p>
  
  <ul>
  <li>If it's production or development build</li>
  <li>The locale I'm using</li>
  </ul>
  
  <p>In my <code>angular.json</code> I have:</p>
  
  <pre><code>"build": {
    ...
    "configurations": {
      "production": {
        "fileReplacements": [
          {
            "replace": "src/environments/environment.ts",
            "with": "src/environments/environment.prod.ts"
          }
        ],
        "optimization": true,
        "outputHashing": "all",
        "sourceMap": false,
        "extractCss": true,
        "namedChunks": false,
        "aot": true,
        "extractLicenses": true,
        "vendorChunk": false,
        "buildOptimizer": true
      },
      "pl": {
        "fileReplacements": [
          {
            "replace": "src/assets/i18n/translations.json",
            "with": "src/assets/i18n/pl.json"
          }
        ]
      },
      "en": {
        "fileReplacements": [
          {
            "replace": "src/assets/i18n/translations.json",
            "with": "src/assets/i18n/en.json"
          }
        ]
      }
    }
  }
  </code></pre>
  
  <p>But when I'm doing <code>ng build --configuration=en --configuration=production</code> I'm getting an error <code>Configuration 'en,production' could not be found</code>. I understand it means you can specify only 1 configuration at a time.</p>
  
  <p>This means I need to create separate <code>en</code>, <code>pl</code>, <code>productionEn</code>, <code>productionPl</code> configurations. Though not the cleanest pattern, I can live with that.</p>
  
  <pre><code>"build": {
    ...
    "configurations": {
      "production": {
        "fileReplacements": [
          {
            "replace": "src/environments/environment.ts",
            "with": "src/environments/environment.prod.ts"
          }
        ],
        "optimization": true,
        "outputHashing": "all",
        "sourceMap": false,
        "extractCss": true,
        "namedChunks": false,
        "aot": true,
        "extractLicenses": true,
        "vendorChunk": false,
        "buildOptimizer": true
      },
      "pl": {
        "fileReplacements": [
          {
            "replace": "src/assets/i18n/translations.json",
            "with": "src/assets/i18n/pl.json"
          }
        ]
      },
      "en": {
        "fileReplacements": [
          {
            "replace": "src/assets/i18n/translations.json",
            "with": "src/assets/i18n/en.json"
          }
        ]
      },
      "productionPl": {
        "fileReplacements": [
          {
            "replace": "src/environments/environment.ts",
            "with": "src/environments/environment.prod.ts"
          },
          {
            "replace": "src/assets/i18n/translations.json",
            "with": "src/assets/i18n/pl.json"
          }
        ],
        "optimization": true,
        "outputHashing": "all",
        "sourceMap": false,
        "extractCss": true,
        "namedChunks": false,
        "aot": true,
        "extractLicenses": true,
        "vendorChunk": false,
        "buildOptimizer": true
      },
      "productionEn": {
        "fileReplacements": [
          {
            "replace": "src/environments/environment.ts",
            "with": "src/environments/environment.prod.ts"
          },
          {
            "replace": "src/assets/i18n/translations.json",
            "with": "src/assets/i18n/en.json"
          }
        ],
        "optimization": true,
        "outputHashing": "all",
        "sourceMap": false,
        "extractCss": true,
        "namedChunks": false,
        "aot": true,
        "extractLicenses": true,
        "vendorChunk": false,
        "buildOptimizer": true
      }
    }
  }
  </code></pre>
  
  <p>But what I can't live with is copying and pasting the whole <code>production</code> configuration contents into <code>productionEn</code> and <code>productionPl</code>. If I add even more locales, or some third separate aspect that I'd like to specify during build, this pattern would become a total nightmare to maintain. Unfortunately it seem it's the pattern that Angular team recommends in their <a href="https://angular.io/guide/i18n#merge-with-the-aot-compiler" rel="noreferrer">documentation</a>.</p>
  
  <p>Is there a way to tell Angular CLI that <code>productionEn</code> extends <code>production</code>, so to not duplicate the same configuration code multiple times? Something like the code below:</p>
  
  <pre><code>"build": {
    ...
    "configurations": {
      "production": {
        (...)
      },
      "pl": {
        "extends": "production",
        (...)
      },
      "en": {
        "extends": "production",
        (...)
      }
    }
  }
  </code></pre>