Description
Which @angular/* package(s) are the source of the bug?
localize, Don't known / other
Is this a regression?
Yes
Description
When a component using i18n and a directive with inputs with custom service for translation/localization purposes is packed as a library and installed in an Angular 17 project, translations no longer work (only default English values are populated).
Same code works in components that are defined in the application (not installed as a separate library/package), and the translations also work with "browser" build (with some additional configurations):
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser"
Everything also works as expected when updating Angular 16 application to 17, but not when installing the packages in a newly created Angular 17 application, so it seems the issue is caused by the new default build system - https://angular.io/guide/esbuild.
Reproduction:
- unzip
- npm i
- ng serve -o --configuration=es
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version
)
Angular CLI: 17.1.1
Node: 18.18.2
Package Manager: npm 9.8.1
OS: darwin x64
Angular: 17.1.1
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1701.1
@angular-devkit/build-angular 17.1.1
@angular-devkit/core 17.1.1
@angular-devkit/schematics 17.1.1
@schematics/angular 17.1.1
rxjs 7.8.1
typescript 5.2.2
zone.js 0.14.3
Anything else?
Related issue: