Skip to content

Commit

Permalink
fix(@angular/build): prevent server manifest generation when no serve…
Browse files Browse the repository at this point in the history
…r features are enabled

This change ensures that the server manifest is not generated if none of the server-related features are enabled.

Closes #29443

(cherry picked from commit 9b0d730)
  • Loading branch information
alan-agius4 committed Jan 30, 2025
1 parent 0eea8fc commit 45abd15
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export async function executePostBundleSteps(
const {
baseHref = '/',
serviceWorker,
i18nOptions,
ssrOptions,
indexHtmlOptions,
optimizationOptions,
sourcemapOptions,
Expand Down Expand Up @@ -113,7 +113,7 @@ export async function executePostBundleSteps(

// Create server manifest
const initialFilesPaths = new Set(initialFiles.keys());
if (serverEntryPoint) {
if (serverEntryPoint && (outputMode || prerenderOptions || appShellOptions || ssrOptions)) {
const { manifestContent, serverAssetsChunks } = generateAngularServerAppManifest(
additionalHtmlOutputFiles,
outputFiles,
Expand Down

0 comments on commit 45abd15

Please sign in to comment.