You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to pass environment variables into the application during serve and build. In Angular 19, this works for build: ng build --define="GGCC_TARGET='hosted'", while this doesn't for serve: ng serve --define="GGCC_TARGET='hosted'", with the following error:
Error: Unknown argument: define
Describe the solution you'd like
The --define argument works for both serve and build commands.
Describe alternatives you've considered
The custom "@ngx-env/builder:application" builder works, but I'd prefer to keep the amount of extra libraries to a minimum. Given how that builder is merely a thin wrapper around "@angular/build:application", I don't see why this couldn't work as I expect out of the box.
The text was updated successfully, but these errors were encountered:
Command
serve
Description
I want to pass environment variables into the application during serve and build. In Angular 19, this works for build:
ng build --define="GGCC_TARGET='hosted'"
, while this doesn't for serve:ng serve --define="GGCC_TARGET='hosted'"
, with the following error:Describe the solution you'd like
The
--define
argument works for both serve and build commands.Describe alternatives you've considered
The custom "@ngx-env/builder:application" builder works, but I'd prefer to keep the amount of extra libraries to a minimum. Given how that builder is merely a thin wrapper around "@angular/build:application", I don't see why this couldn't work as I expect out of the box.
The text was updated successfully, but these errors were encountered: