angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

App shell schematic does not use production configuration

Open filipesilva opened this issue 8 years ago • 2 comments

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"
    }
  }
}

filipesilva avatar Jul 18 '18 12:07 filipesilva

I am getting enableProdMode() warning. Is this related to the server distribution?

prasannapattam avatar Sep 22 '18 05:09 prasannapattam

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.