-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Closed
Copy link
Description
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 trying out the new HMR in angular 19, I found an issue when using jit mode to serve (i.e. "aot": false
). HMR of styles is working, but on the first change nothing happens, and then on subsequent changes, the last change takes effect. The same issue is not present with aot mode (we are unable to use aot in our application as incremental rebuilds take ~2 minutes each time). This does not appear to affect inline component <style>
tags and only for styles added via the styleUrl
property.
Minimal Reproduction
- Create a new angular application with latest rc of angular 19
- Set
"aot": false
in theangular.json
- Change
src/app/app.component.html
to<h1>Hello world!</h1>
- Change
src/app/app.component.scss
toh1 { color: red; }
and observe nothing happens - Change
src/app/app.component.scss
toh1 { color: blue; }
and observe the h1 tag is nowred
instead ofblue
. Any future style updates now show the previous update.
Exception or Error
Your Environment
Angular CLI: 19.0.0-rc.2
Node: 20.15.0
Package Manager: npm 10.7.0
OS: darwin arm64
Angular: 19.0.0-rc.3
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1900.0-rc.2
@angular-devkit/build-angular 19.0.0-rc.2
@angular-devkit/core 19.0.0-rc.2
@angular-devkit/schematics 19.0.0-rc.2
@angular/cli 19.0.0-rc.2
@schematics/angular 19.0.0-rc.2
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0
Anything else relevant?
No response