angular.json is the Angular CLI workspace configuration file for project, build, and development-tool settings. Modern Angular projects generate a shorter file than older projects, alongside standalone application structure and fewer default files. section 1.3.2
The file becomes especially important when an application needs deployment-specific behavior. Server-side rendering adds build properties for the server entry point, prerendering, and the SSR entry file, while leaving much of the configuration familiar. section 9.2.1
Common configuration responsibilities include:
- Selecting the server entry point and enabling prerendering for an SSR application. section 9.2.1
- Replacing the base environment file with a development, QA, or other environment-specific file. section 9.4.3
- Running a selected configuration during builds or local development with the Angular CLI. section 9.4.3
Adding a QA environment
Run ng generate environments, add a QA environment file and matching configuration, then run ng build --configuration qa. Angular uses the configured file replacement so imports continue to target environment.ts. section 9.4.3
Listing 9.3 angular.json file of an SSR application
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
#1
"server": "src/main.server.ts", #2
"prerender": true, #3
"ssr": {
"entry": "server.ts" #4
}
},
}
Inspect the compact SSR build configuration, including server, prerender, and server entry settings. section 9.2.1
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.development.ts"
}
]
}
Inspect a development configuration that disables optimization, preserves source maps, and replaces the base environment file. section 9.4.3

