
This bring is changes to the @nodejs repository required for https://github.com/angular/angular/pull/33927. See release notes for more details: https://github.com/bazelbuild/rules_nodejs/releases/tag/0.41.0. rules_nodejs is approaching 1.0 and breaking changes for that release are being made more frequently. In this release, the ts_devserver API changed and it no longer injects html script tags into a provided index.html file. The diff on this commit is large as this breaking change affects quite a few tests. Also note that we don’t update @angular/bazel schematics and integration/bazel as 0.41.0 is not a recommended update for angular users yet due to the breaking changes in ts_devserver & web_package (now named pkg_web). When a suitable plain npm package that is in progress is finished then it will be possible to easily replace the html injection functionality removed from ts_devserver & pkg_web. PR Close #33996
51 lines
1.4 KiB
Python
51 lines
1.4 KiB
Python
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle")
|
|
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
|
|
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
|
|
|
|
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
|
|
|
|
# Note that this benchmark has been designed for Angular with ViewEngine, but once
|
|
# ViewEngine is removed, we should should consider removing this one since there
|
|
# already is a "render3" benchmark.
|
|
ng_module(
|
|
name = "ng2",
|
|
srcs = glob(["*.ts"]),
|
|
generate_ve_shims = True,
|
|
tsconfig = "//modules/benchmarks:tsconfig-build.json",
|
|
# TODO: FW-1004 Type checking is currently not complete.
|
|
type_check = False,
|
|
deps = [
|
|
"//modules/benchmarks/src:util_lib",
|
|
"//modules/benchmarks/src/tree:util_lib",
|
|
"//packages/core",
|
|
"//packages/platform-browser",
|
|
"//packages/platform-browser-dynamic",
|
|
],
|
|
)
|
|
|
|
ng_rollup_bundle(
|
|
name = "bundle",
|
|
entry_point = ":index_aot.ts",
|
|
deps = [
|
|
":ng2",
|
|
"@npm//rxjs",
|
|
],
|
|
)
|
|
|
|
ts_devserver(
|
|
name = "prodserver",
|
|
bootstrap = ["//packages/zone.js/dist:zone.js"],
|
|
port = 4200,
|
|
static_files = ["index.html"],
|
|
deps = [":bundle.min_debug.es2015.js"],
|
|
)
|
|
|
|
benchmark_test(
|
|
name = "perf",
|
|
server = ":prodserver",
|
|
deps = [
|
|
"//modules/benchmarks/src/tree:perf_detect_changes_lib",
|
|
"//modules/benchmarks/src/tree:perf_lib",
|
|
],
|
|
)
|