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

    featureIssue that requests a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions