Alan Agius 8f9fc59f2e fix(@angular/build): minimize reliance on esbuild inject to prevent code reordering
Resolved an issue where the use of `esbuild`'s `inject` feature caused incorrect reordering of class structures during bundling. This reordering affected extended classes, as illustrated below:

```js
class e extends Ur {
  constructor(n, r, i) {
    super(n, r, i);
  }
  ngOnDestroy() {
    this.flush();
  }
  static ɵfac = function (r) {
    return new (r || e)(pe(Xe), pe(Ti), pe(Di));
  };
  static ɵprov = oe({ token: e, factory: e.ɵfac });
}

var Ur = class {
  // Class properties and methods omitted for brevity
};
```

By reducing the reliance on `inject`, we ensure that the ordering of class properties and methods remains consistent, preserving the expected behavior.

Closes #28941
2024-11-25 15:02:35 -05:00
..