2018-06-22 13:38:30 -04:00
|
|
|
load("//tools:defaults.bzl", "ts_library")
|
|
|
|
|
2019-01-16 04:19:01 -05:00
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
2018-06-22 13:38:30 -04:00
|
|
|
# Either loads reflect-metadata or is a no-op, depending on whether compilation is in JIT mode.
|
|
|
|
ts_library(
|
|
|
|
name = "reflect_metadata",
|
|
|
|
srcs = [
|
2018-10-24 12:46:08 -04:00
|
|
|
"src/reflect_metadata_aot.ts",
|
2018-06-22 13:38:30 -04:00
|
|
|
"src/reflect_metadata_jit.ts",
|
|
|
|
"src/reflect_metadata_legacy.ts",
|
|
|
|
":metadata_switch",
|
|
|
|
],
|
|
|
|
module_name = "@angular/core/test/bundling/util/src/reflect_metadata",
|
2019-09-06 19:01:18 -04:00
|
|
|
module_root = "src/reflect_metadata",
|
2019-02-20 12:54:42 -05:00
|
|
|
deps = ["@npm//reflect-metadata"],
|
2018-06-22 13:38:30 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
# See packages/core/BUILD.bazel.
|
|
|
|
genrule(
|
|
|
|
name = "metadata_switch",
|
|
|
|
outs = ["src/reflect_metadata.ts"],
|
|
|
|
cmd = "echo import \"'./reflect_metadata_$(compile)';\" > $@",
|
|
|
|
)
|