Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bug(HMR): style changes not applied in module app w/module, w/module+standalone, and fully standalone #59640

Closed
@msmallest

Description

@msmallest

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

Don't known / other

Is this a regression?

Yes

Description

edit: it's just provideAnimationsAsync(). Removed it from the module and now the styling worked, and I removed it from the standalone app and it worked.

Module based apps seem to not have style changes applied when a style is changed in a component (inline style or file-based style). Same applies for module based but in a standalone component... and even an app fully converted to standalone from what I can tell?

Fully module based
https://github.com/msmallest/module-based-hmr/tree/issue2--module-styling-issues

Problem component is a standalone component inside a component used in a module
https://github.com/msmallest/module-based-hmr/tree/issue2-module-root-standalone-component

(edit: see first comment by me, I realized the problem)
I converted the whole app to standalone and there is still an issue. But I have had working fully standalone apps before with the latest patches, so I must be missing something. But I can't tell what is missing between those fresh ones and this example. I even cleared .angular/, restarted the serve server, re-opened IDE, and even tried in a different browser from the other tests
https://github.com/msmallest/module-based-hmr/tree/issue2--fully-standalone

(edit: see first comment by me, I realized the problem)
edit: here is a repo I used for a different issue a couple days ago - but in a new branch issue-59640-comparison-never-module. It was and still is in a working state with the newest patch versions. I made the same component as the above examples in this app that never had modules, and it has no style issues whether it is file-based or inline style https://github.com/msmallest/hmr-issue-multiple-components/tree/issue-59640-comparison-never-module. I will take a closer look at the difference between this and issue2--fully-standalone later, but between this and the other issue I'm a bit confused at the moment.

Please provide a link to a minimal reproduction of the bug

https://github.com/msmallest/module-based-hmr/tree/issue2--module-styling-issues

Please provide the exception or error you saw


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

Angular CLI: 19.1.3
Node: 20.11.1
Package Manager: npm 10.2.4
OS: darwin arm64

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

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

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions