Skip to content

Conversation

clydin
Copy link
Member

@clydin clydin commented Dec 2, 2024

When component template HMR support is enabled (NG_HMR_TEMPLATES=1), TypeScript file changes will now be analyzed to determine if Angular component metadata has changed and if the changes can support a hot replacement. Any other changes to a TypeScript file will cause a full page reload to avoid inconsistent state between the code and running application. The analysis currently has an upper limit of 32 modified files at one time to prevent a large of amount of analysis to be performed which may take longer than a full rebuild. This value may be adjusted based on feedback. Component template HMR is currently experimental and may not support all template modifications. Both inline and file-based templates are now supported. However, rebuild times have not yet been optimized.

@clydin clydin added the target: minor This PR is targeted for the next minor release label Dec 2, 2024
@clydin clydin force-pushed the hmr/sourcefile-analysis branch from 5669460 to 36b6f2e Compare December 3, 2024 03:49
@clydin clydin marked this pull request as ready for review December 3, 2024 03:49
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Dec 3, 2024
@clydin clydin force-pushed the hmr/sourcefile-analysis branch from 36b6f2e to ee30379 Compare December 3, 2024 03:52
When component template HMR support is enabled (`NG_HMR_TEMPLATES=1`),
TypeScript file changes will now be analyzed to determine if Angular component
metadata has changed and if the changes can support a hot replacement. Any
other changes to a TypeScript file will cause a full page reload to avoid
inconsistent state between the code and running application. The analysis
currently has an upper limit of 32 modified files at one time to prevent
a large of amount of analysis to be performed which may take longer than
a full rebuild. This value may be adjusted based on feedback. Component
template HMR is currently experimental and may not support all template
modifications. Both inline and file-based templates are now supported.
However, rebuild times have not yet been optimized.
@clydin clydin force-pushed the hmr/sourcefile-analysis branch from ee30379 to b811100 Compare December 3, 2024 14:01
@clydin clydin requested a review from alan-agius4 December 3, 2024 15:13
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 3, 2024
@alan-agius4 alan-agius4 merged commit 378624d into angular:main Dec 3, 2024
30 of 31 checks passed
@clydin clydin deleted the hmr/sourcefile-analysis branch December 3, 2024 17:03
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants