Skip to content

HMR in Angular 19.1.1 breaks page reload by ignoring --serve-path #29395

@nhnb

Description

@nhnb

Which @angular/* package(s) are the source of the bug?

compiler-cli

Is this a regression?

Yes

Description

Since Angular 19.1.x the --serve-path parameter is ignored by hot template replacements requests. As a result the page is neither updated nor reloaded automatically. A manual reload is required.

Steps to reproduce:

  1. Start the dev server: ng serve --no-hmr --port 5602 --host 127.0.0.1 --serve-path /frontend
  2. Modify a .html file

Result in 19.0.x: The page is automatically reloaded
Result in 19.1.x: Nothing happens. The old page is still shown

Workaround: Start the dev server with: ng serve --no-hmr --port 5602 --host 127.0.0.1 --serve-path /frontend

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

Error message: 404 http://localhost:8080/@ng/component?c=src%2Fapp%2Ffs%2Ftestform.component.ts%40TestformComponent&t=1737187096102

Note the missing `/frontend/` before `@ng`

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 19.1.2
Node: 20.18.1
Package Manager: yarn 1.22.19
OS: linux x64

Angular: 19.1.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... 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/cdk                    17.3.10
@angular/cli                    19.1.2
@schematics/angular             19.1.2
ng-packagr                      19.0.1
rxjs                            7.8.1
typescript                      5.6.3
zone.js                         0.15.0

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions