-
Notifications
You must be signed in to change notification settings - Fork 12k
Closed
Labels
area: @angular-devkit/build-angulardevkit/build-angular:dev-serverfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity2: inconvenienttype: bug/fix
Description
Command
serve
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
webpack browser builder
Description
Hi. I have invalid proxy.conf.json file, with this content:
{
"/cdn": {
"target": "https://website.com",
"secure": false,
"changeOrigin": true,
"logLevel": "debug"
},
"changeOrigin": true
}
Look at the "changeOrigin": true at the end.
It was in my project since angular v8, and now it breaks with esbuild.
I removed this line after i finally realised what caused ng serve
to fail. Maybe there should be some kind of validation before starting dev server?
Minimal Reproduction
https://stackblitz.com/edit/angular-at-dwjtto?file=proxy.conf.json
Exception or Error
TypeError: Cannot use 'in' operator to search for 'pathRewrite' in true
at normalizeProxyConfiguration (/node_modules/@angular-devkit/build-angular/src/builders/dev-server/load-proxy-config.js:146:27)
at loadProxyConfiguration (/node_modules/@angular-devkit/build-angular/src/builders/dev-server/load-proxy-config.js:98:30)
at async setupServer (/node_modules/@angular-devkit/build-angular/src/builders/dev-server/vite-server.js:232:19)
at async serveWithVite (/node_modules/@angular-devkit/build-angular/src/builders/dev-server/vite-server.js:118:41)
Your Environment
Angular: 17.0.0-next.7
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1700.0-next.7
@angular-devkit/build-angular 17.0.0-next.7
@angular-devkit/core 17.0.0-next.7
@angular-devkit/schematics 17.0.0-next.7
@angular/cdk 17.0.0-next.5
@angular/material 17.0.0-next.5
@schematics/angular 17.0.0-next.7
rxjs 7.4.0
typescript 5.2.2
zone.js 0.13.0
Anything else relevant?
No response
Metadata
Metadata
Assignees
Labels
area: @angular-devkit/build-angulardevkit/build-angular:dev-serverfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity2: inconvenienttype: bug/fix