I have a pipeline in azure dev ops and its working successfully by deploying the application a static web app resource. The only problem is the command is never updating the environment variables in the angular project.
- script: |
npm install -g @angular/cli
npm install
npm run build-dev
displayName: 'npm install and build'
this is a step in my pipeline
"build-dev": "ng build --configuration='dev'",
this is in my package.json
"dev": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.dev.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
},
This is in my angular.json. When I run it locally and I use http-server on the dist folder I can see the environment variables are updating. I cannot see why on the pipeline is not updating or where its skipping this step.