In order to speed up bazel build performance delete all rxjs d.ts files
that reference rxjs-compat.
For all ts_library and ng_module rules Bazel generates tsconfig.json file
that explicitly lists all d.ts files found in required npm package.
In case of rxjs, this means that tsconfig contains all d.ts files that
reference rxjs-compat package, which is an interop/backwards compatibility
package not installed in angular/angular repo.
But because tsconfig contains these d.ts files, tsc will try to resolve
them and silently fail. All these lookups are quite expensive and not
cached. This causes significant slowdown of the build under bazel.
This change removes all of these problematic rxjs d.ts files via an npm
postinstall hook. This is not ideal because it solves the problem only
for our repo, but it's a good start.
Build perf improvements per target:
//packages/core/src/reflect:reflect 5sec => 3 sec
//packages/core:core 17sec => 12 sec
//packages/router:router 30sec => 8 sec
PR Close#33786
These were getting included in the @angular/localize package.
Instead, patch the upstream files to work with TS typeRoots option
See bazelbuild/rules_nodejs#1033
PR Close#33226
These were getting included in the @angular/localize package.
Instead, patch the upstream files to work with TS typeRoots option
See bazelbuild/rules_nodejs#1033
PR Close#33176
We were on 69 for both of these platforms which is fairly old. This update also requires a temporary patch to the @bazel/karma npm package to disable chrome sandboxing on OSX as it is broken under Bazel as of chromium 73. Windows is still on Chromium 66 but updating this will require upstream changes to rules_webtesting as the archive name & executable name has changed as of 72 for Windows and hard-coded paths in rules_webtesting break things.
PR Close#30502