Harsha Javalkar
Harsha Javalkar

Reputation: 104

Property proxyConfig is not allowed. Angular

adding proxy to angular application

When I tried to add proxy config file to angular.json showing property is not allowed.

Upvotes: 7

Views: 6823

Answers (2)

Ahmad Alkaf
Ahmad Alkaf

Reputation: 68

As it said. proxyConfig is not allowed inside build.options object. I think you meant to add it in serve.options. If there are no options then create one:

"serve": {
      "builder": "@angular-devkit/build-angular:dev-server",
      "options": {
        "proxyConfig": "src/proxy.conf.json"
      },

Upvotes: 3

Alexander Staroselsky
Alexander Staroselsky

Reputation: 38827

Try instead putting the configuration at architect.serve.options rather than architect.build.options.

https://angular.io/guide/build#proxying-to-a-backend-server

Upvotes: 9

Related Questions