b8e9a30d3b
Previously ngcc never preserved whitespaces but this is at odds with how the ViewEngine compiler works. In ViewEngine, library templates are recompiled with the current application's tsconfig settings, which meant that whitespace preservation could be set in the application tsconfig file. This commit allows ngcc to use the `preserveWhitespaces` setting from tsconfig when compiling library templates. One should be aware that this disallows different projects with different tsconfig settings to share the same node_modules folder, with regard to whitespace preservation. But this is already the case in the current ngcc since this configuration is hard coded right now. Fixes #35871 PR Close #36189 |
||
---|---|---|
.. | ||
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