Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@angular/build): keep background referenced HMR update chunks #29508

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

clydin
Copy link
Member

@clydin clydin commented Jan 28, 2025

When HMR is enabled and a component update is sent to the development server, the following background incremental update will no longer remove the previous JavaScript chunk files for lazy routes. This allows the active and running application code within the browser to still access the lazy chunks referenced in the code. This is important for cases such as when a component in a lazy route (that has not yet been accessed) is modified. In this case, the component update is still processed if/when the lazy route is eventually accessed via the module-time evaluation of the component update code.

Closes #29507

When HMR is enabled and a component update is sent to the development server,
the following background incremental update will no longer remove the previous
JavaScript chunk files for lazy routes. This allows the active and running
application code within the browser to still access the lazy chunks referenced
in the code. This is important for cases such as when a component in a lazy
route (that has not yet been accessed) is modified. In this case, the component
update is still processed if/when the lazy route is eventually accessed via the
module-time evaluation of the component update code.
@clydin clydin added the target: patch This PR is targeted for the next patch release label Jan 28, 2025
@clydin clydin marked this pull request as ready for review January 28, 2025 23:16
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Jan 29, 2025
@alan-agius4 alan-agius4 merged commit d4ee360 into angular:main Jan 29, 2025
33 of 34 checks passed
@alan-agius4
Copy link
Collaborator

The changes were merged into the following branches: main, 19.1.x

@clydin clydin deleted the hmr/lazy-active-files branch January 29, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: @angular/build target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HMR breaks when attempting to load, previously not yet loaded, now modified, lazy loaded chunks
2 participants