Skip to content

Conversation

alan-agius4
Copy link
Collaborator

This commit cleans up duplicate code left from the previous implementations of process, serve, and render. Additionally, prerender serve now exclusively handles HEAD and GET requests, aligning with updated handling requirements. The private renderStatic method has been removed in favor of the handle method for improved maintainability.

@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: rc This PR is targeted for the next release-candidate labels Nov 1, 2024
@alan-agius4 alan-agius4 force-pushed the refactor-minor branch 3 times, most recently from 6a75658 to 387fe14 Compare November 1, 2024 11:42
@alan-agius4 alan-agius4 changed the title refactor(@angular/ssr): remove duplicate code and streamline serve functionality refactor(@angular/ssr): remove duplicate code and streamline functionality Nov 1, 2024
@alan-agius4 alan-agius4 force-pushed the refactor-minor branch 2 times, most recently from 02ef076 to 2dbed77 Compare November 1, 2024 18:55
@alan-agius4 alan-agius4 requested a review from dgp1130 November 1, 2024 19:19
@alan-agius4 alan-agius4 added this to the v19 Candidates milestone Nov 5, 2024
Copy link
Collaborator

@dgp1130 dgp1130 left a comment

Choose a reason for hiding this comment

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

Sorry for the delay on this, just a few minor suggestions.

*
* @private
*/
static ɵhooks = /* #__PURE__*/ new Hooks();
static ɵallowStaticRouteRender = false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider: Should this default to true? If someone naiively uses this class without any extra context, they would likely expect static rendering to work. It's only specific dev use cases where a user would want to go out of their way to disable static rendering.

Copy link
Collaborator Author

@alan-agius4 alan-agius4 Nov 5, 2024

Choose a reason for hiding this comment

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

This is actually to allow static pages to be renderer on the fly (ie: rendered as SSR), this does not effect serving of pre-rendered pages.

Only in the dev-server and builder should be done allowed.

…ality

This commit cleans up duplicate code left from the previous implementations of process, serve, and render. Additionally, prerender serve now exclusively handles HEAD and GET requests, aligning with updated handling requirements. The private `renderStatic` method has been removed in favor of the `handle` method for improved maintainability.
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 6, 2024
@alan-agius4 alan-agius4 merged commit e16cbb9 into angular:main Nov 6, 2024
32 checks passed
@alan-agius4 alan-agius4 deleted the refactor-minor branch November 6, 2024 09:14
@alan-agius4
Copy link
Collaborator Author

The changes were merged into the following branches: main, 19.0.x

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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