8cba4e1f6b
Previously, all of a program's files would be copied into the __ivy_ngcc__ folder where ngcc then writes its modifications into. The set of source files in a program however is much larger than the source files contained within the entry-point of interest, so many more files were copied than necessary. Even worse, it may occur that an unrelated file in the program would collide with an already existing source file, resulting in incorrectly overwriting a file with unrelated content. This behavior has actually been observed with @angular/animations and @angular/platform-browser/animations, where the former package would overwrite declaration files of the latter package. This commit fixes the issue by only copying relevant source files when cloning a bundle's content into __ivy_ngcc__. Fixes #29960 PR Close #30020 |
||
---|---|---|
.. | ||
src | ||
test | ||
BUILD.bazel | ||
README.md | ||
index.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