Skip to content

Instantly share code, notes, and snippets.

@rajaramtt
Created May 29, 2019 07:16
Show Gist options
  • Save rajaramtt/5c1468f3160d25e88b167f1d017ee394 to your computer and use it in GitHub Desktop.
Save rajaramtt/5c1468f3160d25e88b167f1d017ee394 to your computer and use it in GitHub Desktop.
Configuring application environments

environments ├── environment.staging.ts

angular.json

"configurations": {

"staging": { "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.staging.ts" } ], "optimization": true, "outputHashing": "all", "sourceMap": false, "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true },

        }
        
     "serve": { 
     
       "configurations": {
       
         "staging": {
          "browserTarget": "Daymed:build:vm"
        },
        
        }
        }

ng build --configuration=staging --base-href /v1/ ng build --configuration=staging ng serve --configuration=staging

Referance : https://angular.io/guide/build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment