mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
8ed1e53e99
Interestingly enough, our rollup bundle optimization pipeline did not work properly before 1b827b058e5060963590628d4735e6ac83c6dfdd. Unused declarations were not elided because build optimizer did not consider the Angular packages as side-effect free. Build optimizer has a hard-coded list of Angular packages that are considered side-effect free. Though this one did not match in the old version of the rollup bundle rule, as internal sources were resolved through their resolved bazel-out paths. Hence build optimizer could not detect the known Angular framework packages. Now though, since we leverage the Bazel-idiomatic `@bazel/rollup` implementation, sources are resolved through linked `node_modules`, and build optimizer is able to properly detect files as side-effect free. PR Close #37778