Skip to content

Commit

Permalink
fix(@angular/build): simplify disabling server features with `--no-se…
Browse files Browse the repository at this point in the history
…rver` via command line

When `outputMode` is configured, `--prerender` and `--app-shell` become no-ops, making server feature disabling difficult without modifying the configuration.

This commit introduces the `--no-server` option, which can be used with `--output-mode static` to fully disable all server features.

```
ng build --output-mode static --no-server
```
  • Loading branch information
alan-agius4 committed Oct 25, 2024
1 parent 2b190db commit 615348c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/angular/build/src/builders/application/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,18 @@
},
"server": {
"type": "string",
"description": "The full path for the server entry point to the application, relative to the current workspace."
"description": "The full path for the server entry point to the application, relative to the current workspace.",
"oneOf": [
{
"type": "string",
"description": "The full path for the server entry point to the application, relative to the current workspace."
},
{
"const": false,
"type": "boolean",
"description": "Indicates that a server entry point is not provided."
}
]
},
"polyfills": {
"description": "A list of polyfills to include in the build. Can be a full path for a file, relative to the current workspace or module specifier. Example: 'zone.js'.",
Expand Down

0 comments on commit 615348c

Please sign in to comment.