We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
NG_BUILD_OPTIMIZE_CHUNKS
build
No response
When we run a build with NG_BUILD_OPTIMIZE_CHUNKS the stats.json file is not updated so it will show build with the old bundles and not the new ones.
This makes it harder to analyse the build output.
Run ng build --statsJson on any project using the NG_BUILD_OPTIMIZE_CHUNKS environment variable.
ng build --statsJson
Then open the stats.json on https://esbuild.github.io/analyze/
stats.json
https://esbuild.github.io/analyze/
You should clearly notice that the old chunks before the optimization are present and the changes on main are not reflected.
Angular CLI: 18.2.6 Node: 22.10.0 Package Manager: npm 10.9.0 OS: win32 x64 Angular: 18.2.6 ... animations, cli, common, compiler, compiler-cli, core, forms ... language-service, platform-browser, platform-browser-dynamic ... platform-server, router, ssr Package Version --------------------------------------------------------- @angular-devkit/architect 0.1802.6 @angular-devkit/build-angular 18.2.6 @angular-devkit/core 18.2.6 @angular-devkit/schematics 18.2.6 @schematics/angular 18.2.6 rxjs 7.8.1 typescript 5.5.4 zone.js 0.14.10
Potential solution is to adapt the meta data eg:
https://github.com/push-based/ngx-build/blob/ec331e177e43f2c45d4f56b4df4d87a20a5fabfd/packages/esbuild-plugin/src/lib/bundle-adaptor.utils.ts
I am happy to contribute and help if can :)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Command
build
Is this a regression?
The previous version in which this bug was not present was
No response
Description
When we run a build with
NG_BUILD_OPTIMIZE_CHUNKS
the stats.json file is not updated so it will show build with the old bundles and not the new ones.This makes it harder to analyse the build output.
Minimal Reproduction
Run
ng build --statsJson
on any project using theNG_BUILD_OPTIMIZE_CHUNKS
environment variable.Then open the
stats.json
onhttps://esbuild.github.io/analyze/
You should clearly notice that the old chunks before the optimization are present and the changes on main are not reflected.
Exception or Error
Your Environment
Anything else relevant?
Potential solution is to adapt the meta data eg:
https://github.com/push-based/ngx-build/blob/ec331e177e43f2c45d4f56b4df4d87a20a5fabfd/packages/esbuild-plugin/src/lib/bundle-adaptor.utils.ts
I am happy to contribute and help if can :)
Related:
The text was updated successfully, but these errors were encountered: