Skip to content

fix(compiler): use chunk origin in template HMR request URL#59459

Closed
clydin wants to merge 1 commit intoangular:mainfrom
clydin:hmr/full-url
Closed

fix(compiler): use chunk origin in template HMR request URL#59459
clydin wants to merge 1 commit intoangular:mainfrom
clydin:hmr/full-url

Conversation

@clydin
Copy link
Copy Markdown
Member

@clydin clydin commented Jan 9, 2025

The URL that is dynamically imported to fetch a potential component update for HMR is now based on the value of import.meta.url. This ensures that the request is sent to the same location that was used to retrieve the application code. For some development server setups the HTML base HREF may not be the location of the Angular development server. By using the application code location which was generated by the development server, HMR requests can continue to work as expected in these scenarios. In most common cases, this change will not have any effect as the HTML base HREF aligns with the location of the application code files.

The URL that is dynamically imported to fetch a potential component update
for HMR is now based on the value of `import.meta.url`. This ensures that
the request is sent to the same location that was used to retrieve the
application code. For some development server setups the HTML base HREF
may not be the location of the Angular development server. By using the
application code location which was generated by the development server,
HMR requests can continue to work as expected in these scenarios. In
most common cases, this change will not have any effect as the HTML base
HREF aligns with the location of the application code files.
@clydin clydin added the target: rc This PR is targeted for the next release-candidate label Jan 9, 2025
@pullapprove pullapprove bot requested a review from devversion January 9, 2025 21:29
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Jan 9, 2025
@ngbot ngbot bot added this to the Backlog milestone Jan 9, 2025
@clydin clydin requested review from crisbeto and removed request for devversion January 9, 2025 21:30
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Jan 9, 2025
@clydin clydin 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 Jan 9, 2025
@kirjs
Copy link
Copy Markdown
Contributor

kirjs commented Jan 9, 2025

This PR was merged into the repository by commit a416414.

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

kirjs pushed a commit that referenced this pull request Jan 9, 2025
The URL that is dynamically imported to fetch a potential component update
for HMR is now based on the value of `import.meta.url`. This ensures that
the request is sent to the same location that was used to retrieve the
application code. For some development server setups the HTML base HREF
may not be the location of the Angular development server. By using the
application code location which was generated by the development server,
HMR requests can continue to work as expected in these scenarios. In
most common cases, this change will not have any effect as the HTML base
HREF aligns with the location of the application code files.

PR Close #59459
@kirjs kirjs closed this in a416414 Jan 9, 2025
@clydin clydin deleted the hmr/full-url branch January 9, 2025 23:47
PrajaktaB27 pushed a commit to PrajaktaB27/angular that referenced this pull request Feb 7, 2025
…59459)

The URL that is dynamically imported to fetch a potential component update
for HMR is now based on the value of `import.meta.url`. This ensures that
the request is sent to the same location that was used to retrieve the
application code. For some development server setups the HTML base HREF
may not be the location of the Angular development server. By using the
application code location which was generated by the development server,
HMR requests can continue to work as expected in these scenarios. In
most common cases, this change will not have any effect as the HTML base
HREF aligns with the location of the application code files.

PR Close angular#59459
@angular-automatic-lock-bot
Copy link
Copy Markdown

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 Feb 9, 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: compiler Issues related to `ngc`, Angular's template compiler target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants