-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Description
Which @angular/* package(s) are the source of the bug?
compiler-cli
Is this a regression?
Yes
Description
We're aware of reports of local development bugs arising from Angular template HMR in 19.1.x, which has been enabled by default.
List of known issues:
- [Fixed in 19.1.2]
bug(HMR): removing components selectors from a template causes inconsistent behavior with other components in template #59581 - [Fixed in 19.1.2]
ViewContainerRef breaks HMR #59592 - [Fixed in 19.1.2]
applicationbuilder not loading css from localhost correctly withng servewhen using remote dev with HMR angular-cli#29248 - [Fixed in 19.1.3(CLI)]
TypeError: $localize is not a function after HMR Component update sent to client(s) #59605 - [Fixed in 19.1.4(CLI)]
Error: [vite] cannot find entry point module 'file://...'on Windows with SSR angular-cli#29424 - [Fixed in 19.1.3]
HMR Breaks self-referencing components #59632 - [Fixed in 19.1.3]
HMR broken with dynamic component providers #59634 - [Fixed in 19.1.3]
bug(HMR):NgFor/AsyncPipebreak in module components when template/style reload occurs from that component #59639 - [Fixed in 19.1.3]
bug(HMR): style changes not applied in module app w/module, w/module+standalone, and fully standalone #59640
We're actively investigating and fixing these issues to create a smooth HMR experience out of the box. Production builds and releases are not affected. If you discover any additional HMR challenges which don't appear to be related to the linked issues above, verify that you are on a recent version (19.1.3+), and please file a new issue and link it here so we can triage and investigate.
Workarounds
In the meantime, if you encounter any problems relating to HMR, you can work around them in three ways:
- Refresh the page - This loads a fresh copy of your application with up to date code.
ng serve --no-hmr- This disables HMR for your local devserver and automatically refreshes the page on any code changes.- Disable HMR for your project - Configuring
angular.jsonwill disable HMR for allng serveinvocations by default.- This is useful for a project with a large number of developers without needing to communicate these workarounds to all contributors.
- Remember to re-enable once the relevant issues are fixed!
{
"projects": {
"my-project": {
"architect": {
"serve": {
"options": {
"hmr": false
}
}
}
}
}
}Thank you for sharing any HMR issues and helping improve Angular one bugfix at a time. We're committed to fully stabilizing this feature and excited to bring improved build performance to everyone.