Skip to content

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

Closed

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

Activity

  1. msmallest commented on Jan 21, 2025

    @msmallest
    ContributorAuthor

    Update about the seemingly fully standalone having issues: the problem seems to be provideAnimationsAsync(). Removing that fixed the case of the fully standalone not updating the styles.

    msmallest/module-based-hmr@73bd619

    edit: removing provideAnimationsAsync() from the module app worked too, but I did not push that to that branch

  2. self-assigned this
    on Jan 21, 2025
  3. added a commit that references this issue on Jan 21, 2025
    0414c85
  4. added a commit that references this issue on Jan 21, 2025
    b2b3816
  5. added a commit that references this issue on Jan 21, 2025
    65f51e1
  6. added a commit that references this issue on Feb 7, 2025
    bc46d9a
  7. angular-automatic-lock-bot commented on Feb 21, 2025

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  8. locked and limited conversation to collaborators on Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions