Skip to content

HMR doesn't work with "aot": false #30352

Closed
@anhallbe

Description

@anhallbe

Command

serve

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

No response

Description

When angular.json is configured with "aot": false, HMR doesn't work at all.

Minimal Reproduction

  1. Create a project with ng new
  2. In angular.json, add "aot": false to the build options (i.e projects > project > architect > build > options
  3. Run ng serve
  4. In the browser, open the dev tools & network tab
  5. Make a change in any file, e.g the component HTML, TS, or CSS
  6. Notice that the browser does a full refresh

Exception or Error


Your Environment

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 19.2.12
Node: 22.15.1
Package Manager: npm 11.4.0
OS: darwin arm64

Angular: 19.2.11
... common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1902.12
@angular-devkit/build-angular   19.2.12
@angular-devkit/core            19.2.12
@angular-devkit/schematics      19.2.12
@angular/cli                    19.2.12
@schematics/angular             19.2.12
rxjs                            7.8.2
typescript                      5.7.3
zone.js                         0.15.0

Anything else relevant?

Issue can be reproduced regardless of browser and OS.

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