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 angular#29443
  • Loading branch information
alan-agius4 committed Jan 30, 2025
1 parent c0d20e0 commit 59b15e0
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 59b15e0

Please sign in to comment.