Skip to content

fix(i18n): honor a custom outputPath.browser folder when translating federation output - #176

Open
JohnYoungers wants to merge 1 commit into
native-federation:mainfrom
JohnYoungers:fix/i18n-honor-browser-output-folder
Open

JohnYoungers wants to merge 1 commit into
native-federation:mainfrom
JohnYoungers:fix/i18n-honor-browser-output-folder

Conversation

@JohnYoungers

@JohnYoungers JohnYoungers commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem

translateFederationArtifacts joins a literal 'browser' segment onto the output base, but @angular/build lets you change that folder through outputPath.browser, including setting it to an empty string so the output sits directly under the base:

"outputPath": { "base": "dist/apps/root-ui", "browser": "" }

The main build respects this, but the i18n step then looks for the federation artifacts in <base>/browser/<locale>, which does not exist, and the build fails because it expects a folder named browser.

Change

  • translateFederationArtifacts takes an optional browserFolder argument, defaulting to 'browser', so existing callers behave as before.
  • Both call sites in the build builder pass the resolved outputOptions.browser, which keeps an empty string as is.

Tests

Two new cases in i18n.spec.ts cover a custom folder and an empty folder. They normalise path separators so they also run on Windows. The suite has 5 other failing i18n tests on Windows from path separators, the same 5 as on main.

Not covered

remote/builder.ts, update-index-html.ts (SSR) and node-preload.ts also assume a browser folder. I left them alone because they are separate builders and I haven't checked them against a real layout.

🤖 Generated with Claude Code

@JohnYoungers
JohnYoungers marked this pull request as draft October 15, 2026 12:56
… federation output

translateFederationArtifacts hardcoded a 'browser' segment, so a build with
outputPath.browser set to another folder (or to an empty string) looked for
the federation artifacts in a folder that does not exist. Pass the configured
folder through instead.
@JohnYoungers
JohnYoungers force-pushed the fix/i18n-honor-browser-output-folder branch from 9fa3f43 to e498b83 Compare October 19, 2026 12:33
@JohnYoungers
JohnYoungers marked this pull request as ready for review October 19, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant