Skip to content

Conversation

alan-agius4
Copy link
Collaborator

This commit updates the SSR implementation to use the new bootstrapServerApplication function. This simplifies the server-side rendering (SSR) bootstrap process for standalone applications by making it more explicit and removing the need for a custom main.server.ts file that wraps bootstrapApplication.

Key changes:

  • The SSR engine is updated to leverage the new bootstrap function.
  • The ng add @angular/ssr schematic is updated to generate code using bootstrapServerApplication.
  • Internal utilities and tests are updated to align with this new approach.

… server bootstrap

This commit updates the SSR implementation to use the new `bootstrapServerApplication` function. This simplifies the server-side rendering (SSR) bootstrap process for standalone applications by making it more explicit and removing the need for a custom `main.server.ts` file that wraps `bootstrapApplication`.

Key changes:
- The SSR engine is updated to leverage the new bootstrap function.
- The `ng add @angular/ssr` schematic is updated to generate code using `bootstrapServerApplication`.
- Internal utilities and tests are updated to align with this new approach.
@alan-agius4 alan-agius4 added state: blocked action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Sep 3, 2025
@alan-agius4 alan-agius4 requested a review from jkrems September 3, 2025 18:35
@alan-agius4 alan-agius4 removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Sep 3, 2025
@jkrems
Copy link
Contributor

jkrems commented Sep 8, 2025

Question: Do we also need to change CommonEngineOptions#bootstrap?

bootstrap?: Type<{}> | (() => Promise<ApplicationRef>);

I'm not sure if our tests currently cover that API but it looks like it should fail because there's no way to return an app ref from a options.bootstrap callback if we don't pass the new context?

@alan-agius4
Copy link
Collaborator Author

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: @angular/ssr state: blocked target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants