Sitelet https://web.archive.org/web/20260418033435/https://github.com/angular/angular-cli/issues/17696
Skip to content

ng serve with multiple configurations #17696

@kedevked

Description

@kedevked

🚀 Feature request

Following this PR it is now possible to extend build configuration.
Could it not possible to extends serve as well ? Additionnallly, ng serve always searches for entries under ng-serve. Could it not be possible that if those entries are not present it uses values directly under build ?

Description

if we suppose that we have 2 build environment and 3 localize entries, we will need 6 entries under serve to test it locally.

{
  "configurations": {
    "production": {
      "fileReplacements": [
        {
          "replace": "src/environments/environment.ts",
          "with": "src/environments/environment.prod.ts"
        }
      ]
    },
    "production2": {
      "fileReplacements": [
        {
          "replace": "src/environments/environment.ts",
          "with": "src/environments/environment.prod2.ts"
        }
      ]
    },
    "li18n1": {},
    "li18n2": {},
    "li18n3": {}
  }
}

If we are to use all these configs values under serve, we will need 6 entries. I wonder if it cannot be possible to run ng serve -c="i18n1, production1" and to directly use both configs

Metadata

Metadata

Assignees

Labels

area: @angular-devkit/build-angulararea: docsRelated to the documentationfeatureLabel used to distinguish feature request from other issuesfreq1: lowOnly reported by a handful of users who observe it rarely

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions