fix(@angular/build): resolve assets correctly during i18n prerendering#32714
Merged
clydin merged 1 commit intoangular:mainfrom Mar 6, 2026
Merged
fix(@angular/build): resolve assets correctly during i18n prerendering#32714clydin merged 1 commit intoangular:mainfrom
clydin merged 1 commit intoangular:mainfrom
Conversation
fcb8dfe to
24c170f
Compare
There was a problem hiding this comment.
Code Review
The fix to resolve assets correctly during i18n prerendering by including the baseHref is sound and directly addresses the issue described. The addition of an end-to-end test is a great way to ensure this behavior is covered going forward. The provided suggestions to improve the new test file for better maintainability and robustness are valid and do not conflict with any provided rules.
tests/e2e/tests/build/server-rendering/server-routes-output-mode-static-i18n-http-calls.ts
Show resolved
Hide resolved
tests/e2e/tests/build/server-rendering/server-routes-output-mode-static-i18n-http-calls.ts
Show resolved
Hide resolved
tests/e2e/tests/build/server-rendering/server-routes-output-mode-static-i18n-http-calls.ts
Show resolved
Hide resolved
In i18n static output builds, requests for assets made during prerendering (e.g., via `HttpClient`) include the locale's `baseHref`. However, the in-memory asset mapping used by the patched server-side `fetch` did not account for this `baseHref`, causing assets to fail to resolve. Closes angular#32713
24c170f to
7968780
Compare
clydin
approved these changes
Mar 6, 2026
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In i18n static output builds, requests for assets made during prerendering (e.g., via
HttpClient) include the locale'sbaseHref. However, the in-memory asset mapping used by the patched server-sidefetchdid not account for thisbaseHref, causing assets to fail to resolve.Closes #32713