Pete Bacon Darwin 266cc9b162 refactor(compiler-cli): support external template source-mapping when linking (#40237)
This commit changes the `PartialComponentLinker` to use the original source
of an external template when compiling, if available, to ensure that the
source-mapping of the final linked code is accurate.

If the linker is given a file-system and logger, then it will attempt
to compute the original source of external templates so that the final
linked code references the correct template source.

PR Close #40237
2021-01-07 13:12:53 -08:00

42 lines
1.1 KiB
Python

load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
ts_library(
name = "prelink_bootstrap",
testonly = True,
srcs = ["bootstrap.ts"],
deps = [
"//packages:types",
"//packages/compiler-cli/linker",
"//packages/compiler-cli/linker/babel",
"//packages/compiler-cli/src/ngtsc/file_system/testing",
"//packages/compiler-cli/src/ngtsc/logging/testing",
"//packages/compiler-cli/test/compliance_old/mock_compile",
"@npm//@babel/core",
"@npm//@babel/generator",
"@npm//@babel/template",
"@npm//@babel/types",
"@npm//@types/babel__core",
"@npm//@types/babel__generator",
"@npm//@types/babel__template",
"@npm//typescript",
],
)
jasmine_node_test(
name = "prelink",
bootstrap = [
"//tools/testing:node_no_angular_es5",
":prelink_bootstrap_es5",
],
data = [
"//packages/compiler-cli/src/ngtsc/testing/fake_core:npm_package",
],
shard_count = 4,
tags = [
"ivy-only",
],
deps = [
"//packages/compiler-cli/test/compliance_old:test_lib",
],
)