Skip to content

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

Closed
@ciriousjoker

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

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions