Build option "i18nMissingTranslation" not working with esbuild based builds
Command
build
Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When using one of the esbuild based builders, either "build-angular:browser-esbuild" or "build-angular:application", it seems the build option "i18nMissingTranslation" is no longer effective. Regardless of setting, no error or warning is generated during the build.
When using the webpack based "build-angular:browser" builder, the setting still works correctly as expected.
Minimal Reproduction
Example project can be checked here. Project is set up with two entries in the projects/app/locale/messages.xlf file, whereas the translated version messages.de.xlf only provides translation for one entry.
When running ng build --localize for the project, the build passes normally, even as the config option in angular.json "i18nMissingTranslation" is set to error. So it would be expected that build fails in this case.
Now if you change the builder in angular.json to "builder": "@angular-devkit/build-angular:browser" and again run
you will see that build fails with error as expected:
No translation found for "4255964151374252442" ("Second line.").
✖ Localized bundle generation failed.
Exception or Error
No response
Your Environment
Angular CLI: 17.0.3
Node: 18.18.2
Package Manager: npm 9.8.1
OS: darwin x64
Angular: 17.0.4
... animations, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1700.3
@angular-devkit/build-angular 17.0.3
@angular-devkit/core 17.0.3
@angular-devkit/schematics 17.0.3
@angular/cli 17.0.3
@schematics/angular 17.0.3
rxjs 7.8.1
typescript 5.2.2
zone.js 0.14.2
Anything else relevant?
No response
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.