angular-docs-cn/packages/compiler-cli/linker/babel
JoostK e79ce386fc refactor(compiler-cli): allow visiting call expressions without an active linker (#39707)
The compilation result of components may have inserted template
functions into the constant pool, which would be inserted into the Babel
AST upon program exit. Babel will then proceed with visiting this newly
inserted subtree, but we have already cleaned up the linker instance
when exiting the program. Any call expressions within the template
functions would then fail to be processed, as a file linker would no
longer be available.

Since the inserted AST subtree is known not to contain yet more partial
declarations, it is safe to skip visiting call expressions when no
file linker is available.

PR Close #39707
2020-11-24 13:05:40 -08:00
..
src refactor(compiler-cli): allow visiting call expressions without an active linker (#39707) 2020-11-24 13:05:40 -08:00
test refactor(compiler-cli): allow visiting call expressions without an active linker (#39707) 2020-11-24 13:05:40 -08:00
BUILD.bazel refactor(compiler-cli): linker - add Babel plugin, FileLinker and initial PartialLinkers (#39116) 2020-10-19 11:23:45 -07:00
README.md refactor(compiler-cli): linker - add Babel plugin, FileLinker and initial PartialLinkers (#39116) 2020-10-19 11:23:45 -07:00
index.ts refactor(compiler-cli): linker - add Babel plugin, FileLinker and initial PartialLinkers (#39116) 2020-10-19 11:23:45 -07:00

README.md

Angular linker - Babel plugin

This package contains a Babel plugin that can be used to find and link partially compiled declarations in library source code. See the linker package README for more information.

Unit Testing

The unit tests are built and run using Bazel:

yarn bazel test //packages/compiler-cli/linker/babel/test