Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ng serve does not support the "define" argument #28905

Copy link
Copy link
@Klaster1

Description

@Klaster1
Issue body actions

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.