Skip to content

Prerendering doesn't generate index.html for root path of localized website versions #29397

Closed

Description

@ciriousjoker

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

18.0.3 (after updating to 19.0, it started)

Description

I'm trying to prerender a localized website.

/ -> English website (homepage)
/some-english-page (subpage)
/de -> German website (homepage)
/de/some-german-page (subpage)

I therefore need an index.html file (not just the index.csr.html!) at / and /de.

Image

Minimal Reproduction

https://github.com/ciriousjoker/repro-angular-indexcsrhtml
Just check out the commit history, I've named them in a way that explains when it breaks.

Specifically this seems to be an issue:

export const routes: Routes = [
  {
    path: '**',
    component: TestComponent,
  },
];

Keep in mind this exact code worked in Angular 18.

Exception or Error

index.csr.html is generated for / and /de, but index.html is only generated for /, not for /de.

Your Environment

Angular CLI: 19.1.2
Node: 20.18.1
Package Manager: npm 10.8.2
OS: darwin arm64

Angular: 19.1.1
... animations, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic
... platform-server, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1901.2
@angular-devkit/build-angular   19.1.2
@angular-devkit/core            19.1.2
@angular-devkit/schematics      19.1.2
@angular/cli                    19.1.2
@angular/ssr                    19.1.2
@schematics/angular             19.1.2
rxjs                            7.8.1
typescript                      5.7.3
zone.js                         0.15.0

Anything else relevant?

No response

Activity

  1. added
    freq1: low
    on Jan 20, 2025
  2. self-assigned this
    on Jan 20, 2025
  3. added 3 commits that reference this issue on Jan 20, 2025
    a98ca56
    227e10a
    d517f7e
  4. added 2 commits that reference this issue on Jan 22, 2025
    9bacf39
    3546c6d
  5. angular-automatic-lock-bot commented on Feb 22, 2025

    @angular-automatic-lock-bot

    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.

  6. locked and limited conversation to collaborators on Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: @angular/ssrfreq1: lowseverity5: regressiontype: bug/fix

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions