Previously we only compiled the typings files, in ngcc, if there was an ES2015 formatted bundle avaiable. This turns out to be an artificial constraint and we can also support typings compilation via ES5 formats too. This commit changes the ngcc compiler to attempt typings compilation via ES5 if necessary. The order of the formats to consider is now: FESM2015, FESM5, ESM2015, ESM5. FW-1122 PR Close #29092
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/src/ngcc
Unit Testing
The unit tests are built and run using Bazel:
yarn bazel test //packages/compiler-cli/src/ngcc/test
Integration Testing
There are tests that check the behavior of the overall executable:
yarn bazel test //packages/compiler-cli/test/ngcc