-
Notifications
You must be signed in to change notification settings - Fork 12k
Different behaviour build in watch-mode between webpack and esbuild when using @angular/localize #29586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
…ize` Ensures that only modified files are displayed in logs when using the `--localize` flag, preventing unnecessary noise. Closes angular#29586
…ize` Ensures that only modified files are displayed in logs when using the `--localize` flag, preventing unnecessary noise. Closes angular#29586
…ize` Ensures that only modified files are displayed in logs when using the `--localize` flag, preventing unnecessary noise. Closes #29586
@alan-agius4 does this also change the buildtime difference? |
This change only affects logging, which previously included unchanged files when using localization. With regards to performance, I suspect that we could cache some parts of the inlining process, I should have something later today. |
@pkoppers-22 FYI #29606 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Command
build
Is this a regression?
The previous version in which this bug was not present was
Any version using "@angular-devkit/build-angular:browser"
Description
In an app we're using Angulars i18n translation (with json files) to build for a few different languages. When we started using this form of translation we were still using de webpack builder. For testing functionality we were using "ng build --watch --configuration=developent...." with in angular.json "localize": true for the development configuration. Changed files were the only ones used in an incremental build and we could copy the build to a test-server for functional testing.
After changing to esbuild (as of Angular 17) we noticed a change in behaviour when using the build in watch mode. If only 1 source file changed a whole new rebuild was made. When trying to find the cause of this change we also noticed this complete rebuild after using the touch command an a source file. Disabling localize in the development configuration will solve this change in behaviour, but then we can not test the translations with a regular development build.
Is this change in watch-mode behaviour as it should be? We consider it a bug as this change in behaviour isn't documented.
Minimal Reproduction
Reproduction is simple.
Create a new app with "ng new repro-app" with defaults (CSS and no SSR).
Add localization with "ng add @angular/localize".
Make no changes to angular.json.
Start build in watch mode with "ng build --watch --configuration development --localize=true"
Make a change to the stylesheet and see the complete rebuild.
End the watch mode and start a new one with localize=false.
Make another change to the stylesheet and see the incremental build (only stylesheet).
This is the same as using the webpack builder with localize=true.
Exception or Error
Your Environment
Anything else relevant?
We're currently using Angular 18 for building web-apps but will be migrating to 19 soon. If there is a way to change this behaviour without change the current configurations (in angular.json) I would like to know.
If this isn't a bug I also would like to know. In this case we would have to change code in our development tool how dev. builds are made and how watch mode is started.
Thanks in advance.
The text was updated successfully, but these errors were encountered: