diff --git a/packages/angular/build/src/builders/application/options.ts b/packages/angular/build/src/builders/application/options.ts index 79c0052af18e..df34c1cbe510 100644 --- a/packages/angular/build/src/builders/application/options.ts +++ b/packages/angular/build/src/builders/application/options.ts @@ -220,17 +220,17 @@ export async function normalizeOptions( options.ssr = false; } - if (options.prerender) { + if (options.prerender !== undefined) { context.logger.warn( - 'The "prerender" option is no longer needed when "outputMode" is specified.', + 'The "prerender" option is not considered when "outputMode" is specified.', ); - } else { - options.prerender = !!options.server; } - if (options.appShell) { + options.prerender = !!options.server; + + if (options.appShell !== undefined) { context.logger.warn( - 'The "appShell" option is no longer needed when "outputMode" is specified.', + 'The "appShell" option is not considered when "outputMode" is specified.', ); } } diff --git a/packages/angular/build/src/builders/application/schema.json b/packages/angular/build/src/builders/application/schema.json index d47875c6527e..17a48a7590ae 100644 --- a/packages/angular/build/src/builders/application/schema.json +++ b/packages/angular/build/src/builders/application/schema.json @@ -536,7 +536,6 @@ }, "prerender": { "description": "Prerender (SSG) pages of your application during build time.", - "default": false, "oneOf": [ { "type": "boolean", @@ -586,8 +585,7 @@ }, "appShell": { "type": "boolean", - "description": "Generates an application shell during build time.", - "default": false + "description": "Generates an application shell during build time." }, "outputMode": { "type": "string", diff --git a/packages/angular/build/src/builders/dev-server/vite-server.ts b/packages/angular/build/src/builders/dev-server/vite-server.ts index 7a4acb7a00d1..34b6f2745c6f 100644 --- a/packages/angular/build/src/builders/dev-server/vite-server.ts +++ b/packages/angular/build/src/builders/dev-server/vite-server.ts @@ -102,7 +102,7 @@ export async function* serveWithVite( if (browserOptions.prerender || (browserOptions.outputMode && browserOptions.server)) { // Disable prerendering if enabled and force SSR. // This is so instead of prerendering all the routes for every change, the page is "prerendered" when it is requested. - browserOptions.prerender = false; + browserOptions.prerender = undefined; browserOptions.ssr ||= true; } diff --git a/packages/angular_devkit/build_angular/src/builders/extract-i18n/application-extraction.ts b/packages/angular_devkit/build_angular/src/builders/extract-i18n/application-extraction.ts index 78c718eee28f..fb6e9138982e 100644 --- a/packages/angular_devkit/build_angular/src/builders/extract-i18n/application-extraction.ts +++ b/packages/angular_devkit/build_angular/src/builders/extract-i18n/application-extraction.ts @@ -53,8 +53,9 @@ export async function extractMessages( buildOptions.serviceWorker = false; buildOptions.server = undefined; buildOptions.ssr = false; - buildOptions.appShell = false; - buildOptions.prerender = false; + buildOptions.appShell = undefined; + buildOptions.prerender = undefined; + buildOptions.outputMode = undefined; const builderResult = await first(buildApplicationInternal(buildOptions, context));