Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular6 What's browserTarget

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 ...

like image 543
Scipion Avatar asked Aug 20 '18 15:08

Scipion


People also ask

What is browserTarget?

browserTarget is a setting that maps a configuration to a build target e.g. build , serve , test , lint .

What is angular JSON file in angular?

A file named angular. json at the root level of an Angular workspace provides workspace-wide and project-specific configuration defaults for build and development tools provided by the Angular CLI. Path values given in the configuration are relative to the root workspace folder.


1 Answers

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.

like image 67
Dan Schnau Avatar answered Sep 28 '22 23:09

Dan Schnau