Skip to content

Default projects and configurations #11233

@listepo-alterpost

Description

@listepo-alterpost

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request

Area

- [x] devkit
- [ ] schematics

We have many projects in the repository and now there is a lot of copy-paste in the angular.json

There is a proposal to add defaultConfigurations, defaultProjects and be able to inherit that.

Example

{
  "defaultProjects": {
    "defaultApp": {
      "root": "apps/$appName",
      "sourceRoot": "apps/$appName/src",
      "projectType": "application"
    }
  },
  "defaultConfigurations": {
    "defaultProd": {
      "aot": true,
      "optimization": true,
      "sourceMap": true,
      "outputHashing": "all",
      "namedChunks": false,
      "commonChunk": true,
      "buildOptimizer": true
    }
  },
  "projects": {
    "app": {
      "extend": "defaultApp",
      "configurations": {
        "prod": {
          "extend": "defaultProd",
          "extractCss": true,
          "extractLicenses": true,
          "vendorChunk": false
        }
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureLabel used to distinguish feature request from other issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions