Skip to content

fix(@angular/ssr): support server-side rendering configuration options#33264

Open
alan-agius4 wants to merge 1 commit into
angular:mainfrom
alan-agius4:fix/ssr-options
Open

fix(@angular/ssr): support server-side rendering configuration options#33264
alan-agius4 wants to merge 1 commit into
angular:mainfrom
alan-agius4:fix/ssr-options

Conversation

@alan-agius4
Copy link
Copy Markdown
Collaborator

Introduce the ServerRenderingOptions interface to support configuring options such as maxResponseBodySize for server-side rendering.

  • Clean up overloads of provideServerRendering to use the ServerRenderingOptions interface instead of inline anonymous types.
  • Add an array-level type guard hasOptions to check for options arguments at runtime, allowing TypeScript to narrow the arguments union type automatically without the need for manual type assertions (casts).
  • Update the JSDocs for the provideServerRendering overloads to document parameter options and include clear examples.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new ServerRenderingOptions interface and updates the provideServerRendering function to accept these options, allowing configuration of the maximum response body size. The review feedback points out that maxResponseBodySize is marked as required in the interface despite having a documented default value of 1MB, and suggests making it optional to improve usability.

Comment thread packages/angular/ssr/src/routes/route-config.ts Outdated
@alan-agius4 alan-agius4 force-pushed the fix/ssr-options branch 2 times, most recently from 6f5553b to 7a79b85 Compare May 28, 2026 14:34
@alan-agius4 alan-agius4 requested a review from JeanMeche May 28, 2026 14:40
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label May 28, 2026
@alan-agius4 alan-agius4 removed the action: review The PR is still awaiting reviews from at least one requested reviewer label May 28, 2026
Introduce the ServerRenderingOptions interface to support configuring options such as maxResponseBodySize for server-side rendering.

- Clean up overloads of provideServerRendering to use the ServerRenderingOptions interface instead of inline anonymous types.
- Add an array-level type guard hasOptions to check for options arguments at runtime, allowing TypeScript to narrow the arguments union type automatically without the need for manual type assertions (casts).
- Update the JSDocs for the provideServerRendering overloads to document parameter options and include clear examples.
@alan-agius4 alan-agius4 added target: rc This PR is targeted for the next release-candidate action: merge The PR is ready for merge by the caretaker labels May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/ssr target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants