Skip to content

fix: resolve @angular/common/locales bare specifier#85

Open
Aukevanoost wants to merge 1 commit into
mainfrom
issues/port-1107
Open

fix: resolve @angular/common/locales bare specifier#85
Aukevanoost wants to merge 1 commit into
mainfrom
issues/port-1107

Conversation

@Aukevanoost

@Aukevanoost Aukevanoost commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Port from angular-architects/module-federation-plugin#1107

This pull request improves support for Angular i18n locale data in the build system by ensuring that non-English locale data files are properly registered in the federation config. The main changes include introducing new utility functions to resolve and register Angular locale data, updating the build process to call these utilities, and adding comprehensive tests to verify the new behavior.

Enhancements for Angular i18n locale data handling:

  • src/builders/build/i18n.ts: Added the resolveAngularLocaleData and registerAngularLocaleDataInFederationConfig functions to locate and register Angular locale data files as shared entries in the federation config, mirroring Angular’s own fallback logic for locale tags.
  • src/builders/build/builder.ts: Updated the build process to call registerAngularLocaleDataInFederationConfig before external dependencies are resolved, ensuring that required locale data is surfaced and marked as external. [1] [2]

Testing improvements:

  • src/builders/build/i18n-locale-data.spec.ts: Added a comprehensive test suite for the new locale data resolution and registration logic, covering various scenarios including fallback behavior, user overrides, and error handling.

Type and import updates:

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