angular-cli
angular-cli copied to clipboard
Angular CLI SSR Configuration removes trailing comma in AppConfig, resulting in Syntax Errors
Command
add
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
No response
Description
Upon running ng add @angular/ssr
the following happened:
provideHotToastConfig({
position: "bottom-right",
})provideClientHydration(),
provideClientHydration
was not placed on a new line and the trailing comma was removed, resulting in a syntax error.
Minimal Reproduction
run:
ng add @angular/ssr
Exception or Error
Syntax Error
Your Environment
Angular CLI: 17.1.0
Node: 18.14.2
Package Manager: pnpm 8.6.11
OS: win32 x64
Angular: 17.1.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, material-luxon-adapter, platform-browser
... platform-browser-dynamic, platform-server, router, ssr
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1700.3
@angular-devkit/build-angular 17.1.0
@angular-devkit/core 17.0.3
@angular-devkit/schematics 17.0.3
@schematics/angular 17.1.0
rxjs 7.8.0
typescript 5.3.3
zone.js 0.14.3
Anything else relevant?
No response