e7a0e87c41
Previously, when an entry-point was ignored via an ngcc config, ngcc would scan sub-directories for sub-entry-points, but would not use the correct `packagePath`. For example, if `@angular/common` was ignored, it would look at `@angular/common/http` but incorrectly use `.../@angular/common/http` as the `packagePath` (instead of `.../@angular/common`). As a result, it would not retrieve the correct ngcc config for the actual package. This commit fixes it by ensuring the correct `packagePath` is used, even if the primary entry-point corresponding to that path is ignored. In order to do this, a new return value for `getEntryPointInfo()` is added: `IGNORED_ENTRY_POINT`. This is used to differentiate between directories that correspond to no or an incompatible entry-point and those that correspond to an entry-point that could otherwise be valid but is explicitly ignored. Consumers of `getEntryPointInfo()` can then use this info to discard ignored entry-points, but still use the correct `packagePath` when scanning their sub-directories for secondary entry-points. PR Close #37040 |
||
---|---|---|
.. | ||
src | ||
test | ||
BUILD.bazel | ||
README.md | ||
index.ts | ||
main-ivy-ngcc.ts | ||
main-ngcc.ts |
README.md
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