During the recursive processing of dependencies, ngcc resolves the requested file to an actual location on disk, by testing various extensions. For recursive calls however, the path is known to have been resolved in the module resolver. Therefore, it is safe to move the path resolution to the initial caller into the recursive process. Note that this is not expected to improve the performance of ngcc, as the call to `resolveFileWithPostfixes` is known to succeed immediately, as the provided path is known to exist without needing to add any postfixes. Furthermore, the FileSystem caches whether files exist, so the additional check that we used to do was cheap. PR Close #32181
Angular Compatibility Compiler (ngcc)
This compiler will convert node_modules
compiled with ngc
, into node_modules
which
appear to have been compiled with ngtsc
.
This conversion will allow such "legacy" packages to be used by the Ivy rendering engine.
Building
The project is built using Bazel:
yarn bazel build //packages/compiler-cli/ngcc
Unit Testing
The unit tests are built and run using Bazel:
yarn bazel test //packages/compiler-cli/ngcc/test
Integration Testing
There are tests that check the behavior of the overall executable:
yarn bazel test //packages/compiler-cli/ngcc/test:integration