Skip to content

Commit 0fd8ead

Browse files
committed
fix(@angular/build): correctly handle false value in server option
The schema included a top-level `type`, preventing this option from functioning correctly. Closes: #29969
1 parent 088a4cb commit 0fd8ead

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/angular/build/src/builders/application/options.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,12 @@ export async function normalizeOptions(
259259
: await getTailwindConfig(searchDirectories, workspaceRoot, context);
260260

261261
let serverEntryPoint: string | undefined;
262-
if (options.server) {
262+
if (typeof options.server === 'string') {
263+
if (options.server === '') {
264+
throw new Error('The "server" option cannot be an empty string.');
265+
}
266+
263267
serverEntryPoint = path.join(workspaceRoot, options.server);
264-
} else if (options.server === '') {
265-
throw new Error('The "server" option cannot be an empty string.');
266268
}
267269

268270
let prerenderOptions;

packages/angular/build/src/builders/application/schema.json

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"description": "The full path for the browser entry point to the application, relative to the current workspace."
1818
},
1919
"server": {
20-
"type": "string",
2120
"description": "The full path for the server entry point to the application, relative to the current workspace.",
2221
"oneOf": [
2322
{

0 commit comments

Comments
 (0)