Skip to content

App shell schematic does not use production configuration #11578

Closed
@filipesilva

Description

@filipesilva

When adding app-shell via ng generate app-shell, the generated target is

"app-shell": {
  "builder": "@angular-devkit/build-angular:app-shell",
  "options": {
    "browserTarget": "latest-project:build",
    "serverTarget": "latest-project:server",
    "route": "shell"
  }
}

Since browserTarget is latest-project:build, the production build will never be used when running the app-shell target and thus bundles sizes will be very big.

We should either use "browserTarget": "latest-project:build:production", or add a production configuration for the app shell target too.

"app-shell": {
  "builder": "@angular-devkit/build-angular:app-shell",
  "options": {
    "browserTarget": "latest-project:build",
    "serverTarget": "latest-project:server",
    "route": "shell"
  },
  "configurations": {
    "production": {
      "browserTarget": "latest-project:build:production"
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions