30

Here is a standard angular.json file

"projects": {
  "myApp": {
     [...]
     "architect": {
       "build": {
         [...]
         "configurations": {
           "production": { [...] },
           "debug": { [...] }
         }
       },
       "serve": {
         [...]
         "configurations": {
           "production": {
             "browserTarget": "myApp:build:production"
           },
           "debug": {
             "browserTarget": "myApp:build:debug"
           }
         }
       }
     }
   }
 }

I don't understand what's the browserTarget setting for ? I couldn't find any documentation, it seems that I'd have to dig into @angular-devkit ...

Scipion
  • 11,449
  • 19
  • 74
  • 139

1 Answers1

19

browserTarget is a setting that maps a configuration to a build target e.g. build, serve, test, lint. It's kind of a funny name. To be honest I don't know why it's called browserTarget instead of just target.

Further reading here at the angular.io docs.

Dan Schnau
  • 1,505
  • 14
  • 17
  • 5
    It is called `browserTarget` because Angular has another property `serverTarget` which is used when running Angular Universal (server-side rendering). – Yann Jun 12 '22 at 06:11