Repository navigation
feat(@angular/build): add prerender.format option to prerender routes as <route>.html
#34180
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
Merged
alan-agius4
merged 6 commits into
angular:main
from
JohannesHoppe:feat/prerender-format
Oct 20, 2026
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4f2ca8e
feat(@angular/build): add `prerender.format` option to prerender rout…
JohannesHoppe b84634f
fixup! feat(@angular/build): add `prerender.format` option to prerend…
JohannesHoppe 13f8dea
fixup! feat(@angular/build): add `prerender.format` option to prerend…
JohannesHoppe 53a5d30
fixup! feat(@angular/build): add `prerender.format` option to prerend…
JohannesHoppe 7ccd292
fixup! feat(@angular/build): add `prerender.format` option to prerend…
JohannesHoppe d385469
fixup! feat(@angular/build): add `prerender.format` option to prerend…
JohannesHoppe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
feat(@angular/build): add
prerender.format option to prerender rout…
…es as `<route>.html` The new `format` property of the `prerender` option accepts `directory` (default, unchanged behavior) and `file`, like the `build.format` option of Astro. With `file`, routes are written to `<route>.html` instead of `<route>/index.html`. Static hosts serve `<route>/index.html` under `/<route>/`, so a request to `/<route>` is first redirected to the URL with a trailing slash, which the Angular router then removes again. Hosts that serve `<route>.html` for `/<route>` respond without that redirect. The root route (after removing the `baseHref` option) is still written to `index.html`. Static redirect pages follow the same layout. `prerender.format` is also considered when `outputMode` is set, while `prerender.routesFile` and `prerender.discoverRoutes` are not. `file` is only considered when the build does not produce a server, because the `@angular/ssr` runtime looks up prerendered pages as `<route>/index.html`. In that case, a warning is reported and routes are written to `<route>/index.html`. Closes #29173
- Loading branch information
commit 4f2ca8ed37cbb4aef08c9f94cd5650542607e5d8
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.