angular-cn/packages/core/test/bundling/util/BUILD.bazel

24 lines
704 B
Python

load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
# Either loads reflect-metadata or is a no-op, depending on whether compilation is in JIT mode.
ts_library(
name = "reflect_metadata",
srcs = [
"src/reflect_metadata_aot.ts",
"src/reflect_metadata_jit.ts",
"src/reflect_metadata_legacy.ts",
":metadata_switch",
],
module_name = "@angular/core/test/bundling/util/src/reflect_metadata",
deps = ["@npm//reflect-metadata"],
)
# See packages/core/BUILD.bazel.
genrule(
name = "metadata_switch",
outs = ["src/reflect_metadata.ts"],
cmd = "echo import \"'./reflect_metadata_$(compile)';\" > $@",
)