Skip to content

Prerender without build in Angular 19 SSR/hybrid rendering engine #30268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vzarskus opened this issue May 7, 2025 · 1 comment
Closed

Prerender without build in Angular 19 SSR/hybrid rendering engine #30268

vzarskus opened this issue May 7, 2025 · 1 comment

Comments

@vzarskus
Copy link

vzarskus commented May 7, 2025

Command

build

Description

I am specifically talking about the new Angular hybrid rendering engine which is live since version 19.

It would be useful to have an ability to regenerate SSG pages without rebuilding the whole application. Even better if we could pass a route or a list of routes as an argument.

The use case is that some prerendered pages content might get outdated and there is no other way to regenerate them except to rerun the whole build and then redeploy the application.
If we could just run a command to regenerate, it would be much smoother and easier experience.

Describe the solution you'd like

It could be another builder in @angular-builders or just a separate ng command ng prerender --url my-path/my-subpath.

Describe alternatives you've considered

No response

@vzarskus vzarskus changed the title Prerender without build Prerender without build in Angular 19 new SSR engine May 7, 2025
@vzarskus vzarskus changed the title Prerender without build in Angular 19 new SSR engine Prerender without build in Angular 19 new SSR/hybrid rendering engine May 7, 2025
@vzarskus vzarskus changed the title Prerender without build in Angular 19 new SSR/hybrid rendering engine Prerender without build in Angular 19 SSR/hybrid rendering engine May 7, 2025
@alan-agius4
Copy link
Collaborator

Thank you for the suggestion — we understand the use case and appreciate you sharing it.

However, at this time, we don't plan to support regenerating individual SSG routes without a full rebuild. The primary reason is that this introduces complexity and potential inconsistency in the output. Angular’s current SSG model is designed to ensure that all pages are generated from a clean, consistent application state. Running prerendering incrementally from a previously built output introduces challenges around output integrity.

Reusing or merging prerendered outputs can easily lead to mismatches between application code and rendered content, especially if the routing logic or css change. In these cases, using SSR may be a more appropriate approach, as it naturally supports dynamic regeneration.

We believe a full, clean prerender build remains the most reliable way to ensure correctness and predictability in SSG output.

Thanks again for your input we’ll continue to evaluate these needs as we evolve Angular's rendering capabilities.

@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants