0

I know that it can be implemented by configuring angular.json.

"fileReplacements": [
 {
  "replace": "src/environments/environment.ts",
  "with": "src/environments/environment.prod.ts"
 }
]

But can it be implemented through command line parameters? I have two local development environments. They are just different in environment variables.

There is actually no env-file parameter.

ng serve --env-file src/environments/environment.mock.ts
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
user15163984
  • 459
  • 2
  • 8
  • 1
    You need to add an extra build configuration, see the [docs](https://angular.io/guide/build#configuring-application-environments) – JSON Derulo Mar 22 '23 at 08:38

0 Answers0