René's URL Explorer Experiment


Title: Prerendering via "routesFile" with i18n no longer prerenders index.html, produces infinite "Redirecting" loop (since @angular/ssr 20.3.7) · Issue #31877 · angular/angular-cli · GitHub

Open Graph Title: Prerendering via "routesFile" with i18n no longer prerenders index.html, produces infinite "Redirecting" loop (since @angular/ssr 20.3.7) · Issue #31877 · angular/angular-cli

X Title: Prerendering via "routesFile" with i18n no longer prerenders index.html, produces infinite "Redirecting" loop (since @angular/ssr 20.3.7) · Issue #31877 · angular/angular-cli

Description: Command build Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was 20.3.6 Description Using angular.json "prerender": { "routesFile": "...", "discoverRou...

Open Graph Description: Command build Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was 20.3.6 Description Using angular.json "prerend...

X Description: Command build Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was 20.3.6 Description Using angular.json "pr...

Opengraph URL: https://github.com/angular/angular-cli/issues/31877

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Prerendering via \"routesFile\" with i18n no longer prerenders index.html, produces infinite \"Redirecting\" loop (since @angular/ssr 20.3.7)","articleBody":"### Command\n\nbuild\n\n### Is this a regression?\n\n- [x] Yes, this behavior used to work in the previous version\n\n### The previous version in which this bug was not present was\n\n20.3.6\n\n### Description\n\nUsing `angular.json` `\"prerender\": { \"routesFile\": \"...\", \"discoverRoutes\": false }`, in combination with `\"i18n\": { ... }` and `\"localize\"`, no longer prerenders locale/index.html properly.\n\n### Minimal Reproduction\n\nFollow the following minimal reproduction steps:\n1. `ng new test-prerender-i18n --style=scss --ssr --zoneless --ai-config=none`\n2. `cd test-prerender-i18n`\n3. `ng add @angular/localize`\n4. `echo \"/\" > prerender-routes.txt`\n5. Edit `app.routes.ts`, use the following content:\n   ```typescript\n   import { Routes } from '@angular/router';\n   import { App } from './app';\n\n   export const routes: Routes = [\n     { path: '', component: App }\n   ];\n   ```\n6. Edit `angular.json`:\n   - Under `\"projects\" > \"test-prerender-i18n\"`, add:\n     ```json\n       \"i18n\": {\n         \"sourceLocale\": \"en\"\n       },\n     ```\n   - Under `\"configurations\" > \"production\"`, add\n     ```json\n              \"prerender\": {\n                \"routesFile\": \"prerender-routes.txt\",\n                \"discoverRoutes\": false\n              },\n              \"localize\": [\"en\"],\n     ```\n   - Remove `\"outputMode\": \"server\",` (doesn't work with prerender)\n7. Run `ng build`\n8. Try the build: `npx serve dist/test-prerender-i18n/browser/`\n   then open Chrome http://localhost:3000/en => infinite redirect loop\n9. `cat dist/test-prerender-i18n/browser/en/index.html`\n   You will see the following HTML with infinite Redirecting loop, instead of actual prerendered content:\n```html\n\u003c!DOCTYPE html>\n\u003chtml>\n  \u003chead>\n    \u003cmeta charset=\"utf-8\">\n    \u003ctitle>Redirecting\u003c/title>\n    \u003cmeta http-equiv=\"refresh\" content=\"0; url=/en\">\n  \u003c/head>\n  \u003cbody>\n    \u003cpre>Redirecting to \u003ca href=\"/en\">/en\u003c/a>\u003c/pre>\n  \u003c/body>\n\u003c/html>\n```\n\n\n### Exception or Error\n\n```text\nRedirecting\n```\n\n### Your Environment\n\n```text\nAngular CLI: 20.3.11\nNode: 22.16.0\nPackage Manager: npm 11.6.2\nOS: linux x64\n```\n\n### Anything else relevant?\n\n- The issue affects the root route only (\"/\") i.e., the homepage.\n  Other routes (such as /blog) seem to get prerendered just fine.\n- Can reproduce only with `\"discoverRoutes\": false`\n\n### Regression 20.3.6 -> 20.3.7\n- Try version `20.3.6` of `@angular/ssr` => Prerendering works.\n  `npm i @angular/ssr@20.3.6 && ng build && cat dist/test-prerender-i18n/browser/en/index.html`\n- Try version `20.3.7` of `@angular/ssr` => Redirecting...\n  `npm i @angular/ssr@20.3.7 && ng build && cat dist/test-prerender-i18n/browser/en/index.html`\n\n### Culprit\n- https://github.com/angular/angular-cli/releases/tag/20.3.7 → Might be caused by https://github.com/angular/angular-cli/commit/5db6d64870c7ce0b883722a07c828946b7d2217d\n- Also related: https://github.com/angular/angular-cli/issues/31618\n  (A different issue also since `20.3.7` about missing `index.html` in some cases; no mention of i18n.)\n- Note: The issue also reproduces with the upcoming version `21.0.0`:\n  `ng update @angular/core@next @angular/cli@next`\n  `ng build && cat dist/test-prerender-i18n/browser/en/index.html` => Same issue.","author":{"url":"https://github.com/anisabboud","@type":"Person","name":"anisabboud"},"datePublished":"2025-11-19T19:34:47Z","url":"https://github.com/angular/angular-cli/issues/31877"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:94aa60f0-286a-041a-6479-ce15dd4f5007
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBFD0:3F22BC:62745:8C68E:6AFDD65C
html-safe-nonce4e336506bebe9166c26adf5f013450b9ed137bbc1094ef7cf82d770d5dcce921
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkQwOjNGMjJCQzo2Mjc0NTo4QzY4RTo2QUZERDY1QyIsInZpc2l0b3JfaWQiOiIzNzUzODE3NTQxODA2MjQ5NTY0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaca89a9ac2b211b4fe937367fc7bd0df25a64dfaba95f930a5d3a378f4eb79796f
hovercard-subject-tagissue:3644153263
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/31877/issue_layout
twitter:imagehttps://opengraph.githubassets.com/165370252912503c2a3e6b0a297bcb9de1b506233568742b23fe585374fe5ae3/angular/angular-cli/issues/31877
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/165370252912503c2a3e6b0a297bcb9de1b506233568742b23fe585374fe5ae3/angular/angular-cli/issues/31877
og:image:altCommand build Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was 20.3.6 Description Using angular.json "prerend...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameanisabboud
hostnamegithub.com
expected-hostnamegithub.com
None9918bd4004419458bcd838065ac2a76b76ebd11705d73909fff5ab99e996fa23
turbo-cache-controlno-preview
go-importgithub.com/angular/angular-cli git https://github.com/angular/angular-cli.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id36891867
octolytics-dimension-repository_nwoangular/angular-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36891867
octolytics-dimension-repository_network_root_nwoangular/angular-cli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea231c174493a6a442c0b0544475c918b30128208
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular-cli/issues/31877#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F31877
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F31877
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular-cli
Reloadhttps://github.com/angular/angular-cli/issues/31877
Reloadhttps://github.com/angular/angular-cli/issues/31877
Reloadhttps://github.com/angular/angular-cli/issues/31877
angularhttps://github.com/angular
angular-clihttps://github.com/angular/angular-cli
Codehttps://github.com/angular/angular-cli
Issues196 (196)https://github.com/angular/angular-cli/issues
Pull requests20 (20)https://github.com/angular/angular-cli/pulls
Actionshttps://github.com/angular/angular-cli/actions
Security and quality8 (8)https://github.com/angular/angular-cli/security
Insightshttps://github.com/angular/angular-cli/insights
https://github.com/angular/angular-cli
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/31877
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/31877
Bughttps://github.com/angular/angular-cli/issues?q=type:"Bug"
#31910https://github.com/angular/angular-cli/pull/31910
#31884https://github.com/angular/angular-cli/pull/31884
Prerendering via "routesFile" with i18n no longer prerenders index.html, produces infinite "Redirecting" loop (since @angular/ssr 20.3.7)https://github.com/angular/angular-cli/issues/31877#top
#31910https://github.com/angular/angular-cli/pull/31910
#31884https://github.com/angular/angular-cli/pull/31884
https://github.com/alan-agius4
area: @angular/buildhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40angular%2Fbuild%22
freq1: lowOnly reported by a handful of users who observe it rarelyhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22freq1%3A%20low%22
severity5: regressionhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22severity5%3A%20regression%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
https://github.com/anisabboud
anisabboudhttps://github.com/anisabboud
on Nov 19, 2025https://github.com/angular/angular-cli/issues/31877#issue-3644153263
http://localhost:3000/enhttp://localhost:3000/en
https://github.com/angular/angular-cli/releases/tag/20.3.7https://github.com/angular/angular-cli/releases/tag/20.3.7
5db6d64https://github.com/angular/angular-cli/commit/5db6d64870c7ce0b883722a07c828946b7d2217d
SSG generates empty index.html if navigation in guard #31618https://github.com/angular/angular-cli/issues/31618
alan-agius4https://github.com/alan-agius4
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
freq1: lowOnly reported by a handful of users who observe it rarelyhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22freq1%3A%20low%22
severity5: regressionhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22severity5%3A%20regression%22
area: @angular/buildhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40angular%2Fbuild%22
on Nov 20, 2025https://github.com/angular/angular-cli/issues/31877#event-21062862333
alan-agius4https://github.com/alan-agius4
Bughttps://github.com/angular/angular-cli/issues?q=type:"Bug"
on Nov 20, 2025https://github.com/angular/angular-cli/issues/31877#event-21062863425
alan-agius4https://github.com/alan-agius4
on Nov 20, 2025https://github.com/angular/angular-cli/issues/31877#event-21062981093
fix(@angular/build): ensure correct URL joining for prerender routeshttps://github.com/alan-agius4/angular-cli/commit/bdd68004300156023dd79544fba5fede2bf6ee39
https://docs.github.com/articles/closing-issues-via-commit-messages
bdd6800https://github.com/alan-agius4/angular-cli/commit/bdd68004300156023dd79544fba5fede2bf6ee39
alan-agius4https://github.com/alan-agius4
on Nov 20, 2025https://github.com/angular/angular-cli/issues/31877#event-21063029759
alan-agius4https://github.com/alan-agius4
on Nov 20, 2025https://github.com/angular/angular-cli/issues/31877#event-21064049867
fix(@angular/build): ensure correct URL joining for prerender routeshttps://github.com/alan-agius4/angular-cli/commit/9611e360064677c543b6b4976f11914f97f8e240
https://docs.github.com/articles/closing-issues-via-commit-messages
9611e36https://github.com/alan-agius4/angular-cli/commit/9611e360064677c543b6b4976f11914f97f8e240
fix(@angular/build): ensure correct URL joining for prerender routeshttps://github.com/alan-agius4/angular-cli/commit/1fa347a6d24457ef4ca3af6739f9e60e3c4483d1
https://docs.github.com/articles/closing-issues-via-commit-messages
1fa347ahttps://github.com/alan-agius4/angular-cli/commit/1fa347a6d24457ef4ca3af6739f9e60e3c4483d1
fix(@angular/build): ensure correct URL joining for prerender routeshttps://github.com/alan-agius4/angular-cli/commit/432886b46ee41086c32a02ff46f642b676f29fc7
https://docs.github.com/articles/closing-issues-via-commit-messages
432886bhttps://github.com/alan-agius4/angular-cli/commit/432886b46ee41086c32a02ff46f642b676f29fc7
fix(@angular/build): ensure correct URL joining for prerender routeshttps://github.com/alan-agius4/angular-cli/commit/88b906db65b9526680425868e4c1d2d8f35d6e3e
https://docs.github.com/articles/closing-issues-via-commit-messages
88b906dhttps://github.com/alan-agius4/angular-cli/commit/88b906db65b9526680425868e4c1d2d8f35d6e3e
alan-agius4https://github.com/alan-agius4
completedhttps://github.com/angular/angular-cli/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#31884https://github.com/angular/angular-cli/pull/31884
on Nov 20, 2025https://github.com/angular/angular-cli/issues/31877#event-21071409591
alan-agius4https://github.com/alan-agius4
on Nov 20, 2025https://github.com/angular/angular-cli/issues/31877#event-21071410412
fix(@angular/build): ensure correct URL joining for prerender routeshttps://github.com/angular/angular-cli/commit/54d542738e23c275ac6827f19da92213c405f9e2
https://docs.github.com/articles/closing-issues-via-commit-messages
54d5427https://github.com/angular/angular-cli/commit/54d542738e23c275ac6827f19da92213c405f9e2
fix(@angular/build): ensure correct URL joining for prerender routeshttps://github.com/alan-agius4/angular-cli/commit/0fe572ed7121953300bec373ac2261c8da6f89a4
https://docs.github.com/articles/closing-issues-via-commit-messages
0fe572ehttps://github.com/alan-agius4/angular-cli/commit/0fe572ed7121953300bec373ac2261c8da6f89a4
https://github.com/henningtillmann
henningtillmannhttps://github.com/henningtillmann
on Nov 20, 2025https://github.com/angular/angular-cli/issues/31877#issuecomment-3559367259
https://github.com/anisabboud
anisabboudhttps://github.com/anisabboud
on Nov 20, 2025https://github.com/angular/angular-cli/issues/31877#issuecomment-3559471215
@alan-agius4https://github.com/alan-agius4
alan-agius4https://github.com/alan-agius4
on Nov 21, 2025https://github.com/angular/angular-cli/issues/31877#event-21098966947
fix(@angular/build): ensure correct URL joining for prerender routeshttps://github.com/alan-agius4/angular-cli/commit/7d184b714e01760e50c7466f591d192ed26adb81
https://docs.github.com/articles/closing-issues-via-commit-messages
7d184b7https://github.com/alan-agius4/angular-cli/commit/7d184b714e01760e50c7466f591d192ed26adb81
alan-agius4https://github.com/alan-agius4
Cherry-pick several SSR/SSG fixes to 20.3.x #31910https://github.com/angular/angular-cli/pull/31910
on Nov 21, 2025https://github.com/angular/angular-cli/issues/31877#event-21099000909
dgp1130https://github.com/dgp1130
on Nov 21, 2025https://github.com/angular/angular-cli/issues/31877#event-21102430526
fix(@angular/build): ensure correct URL joining for prerender routeshttps://github.com/angular/angular-cli/commit/25bb7e65c4fc7e401c658126c53b0b7a13d62965
https://docs.github.com/articles/closing-issues-via-commit-messages
25bb7e6https://github.com/angular/angular-cli/commit/25bb7e65c4fc7e401c658126c53b0b7a13d62965
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Dec 21, 2025https://github.com/angular/angular-cli/issues/31877#issuecomment-3678233040
automatic conversation locking policyhttps://github.com/angular/angular/blob/f0fbced1c55bc8b8ed9df01cea99df42f3e7eae3/contributing-docs/auto-issue-locking.md
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Dec 21, 2025https://github.com/angular/angular-cli/issues/31877#event-21687361338
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular-cli/issues/31877
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/31877
alan-agius4https://github.com/alan-agius4
area: @angular/buildhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40angular%2Fbuild%22
freq1: lowOnly reported by a handful of users who observe it rarelyhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22freq1%3A%20low%22
severity5: regressionhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22severity5%3A%20regression%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
Bughttps://github.com/angular/angular-cli/issues?q=type:"Bug"
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.