Skip to content

--allowedhosts cli no longer accepts array of hosts if moving from @angular-devkit/build-angular to @ngx-env/builder #164

Description

@silverham

@angular-devkit/build-angular:dev-server accepts an array of hostnames via cli:

ng serve myproject --allowed-hosts "example.com"

but @angular/build:dev-server doesn't (which i believe this project is based on?)

"Error: Unknown argument: example.com"

Workaround:

__VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS=example.com ng serve myproject

Flagging for those wondering like i was (I thought it was drop-in replacement for it but there are slight differences)

Related: Can't use an array of hostnames in --allowedHosts cli parameter in @angular/build:dev-server #33955

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions