Skip to content

SSR build prerender broken if configuration has externalDependencies options #29092

Closed
@klerick

Description

@klerick

Command

build

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Dear Angular Team,

We are experiencing an issue with external dependencies when using Angular 19. In our project, we utilize importmap to load external dependencies and have a custom registry hook for resolving these dependencies on our SSR server. However, we encounter an error when attempting to build the project in version 19.

Causes of the Issue:

  1. Dependency Filtering:

  2. Prerendering:

  3. Custom Hook:

Minimal Reproduction

https://stackblitz.com/edit/stackblitz-starters-iudtwvic?file=package.json

npm run build.

Exception or Error


Your Environment

Angular CLI: 19.0.4
Node: 20.13.1
Package Manager: npm 10.5.2
OS: darwin arm64

Angular: 19.0.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1900.4
@angular-devkit/build-angular   19.0.4
@angular-devkit/core            19.0.4
@angular-devkit/schematics      19.0.4
@angular/cdk                    19.0.2
@angular/cli                    19.0.4
@angular/ssr                    19.0.4
@schematics/angular             19.0.4
rxjs                            7.8.1
typescript                      5.6.3
zone.js                         0.15.0

Possible Solutions

  1. Expose partialSSRBuild Configuration:

    • Allow developers to manually configure or override the partialSSRBuild setting. This would provide more control over the build process and help accommodate projects with custom SSR requirements.
  2. Enhance or Extend Custom Hook:

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions