Skip to content

Instantly share code, notes, and snippets.

@rajaramtt
Last active September 10, 2019 11:58
Show Gist options
  • Save rajaramtt/528d7a150a72c5f5a1b2bf906f0b0f97 to your computer and use it in GitHub Desktop.
Save rajaramtt/528d7a150a72c5f5a1b2bf906f0b0f97 to your computer and use it in GitHub Desktop.
Stage environment setup in angular
"configurations": {
"production": { ... },
"staging": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.staging.ts"
}
]
}
}
// ng build --configuration=staging
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "your-project-name:build"
},
"configurations": {
"production": {
"browserTarget": "your-project-name:build:production"
},
"staging": {
"browserTarget": "your-project-name:build:staging"
}
}
},
// ng serve --configuration=staging
// Referance URL: https://angular.io/guide/build#using-environment-specific-variables-in-your-app
architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/test",
"assets": [
"src/favicon.ico",
"src/assets",
"src/lib",
"src/zoom",
"src/lib/av/"
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment