mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Previously, the cross entry-point dependency was created to share the `setDomTypes` function. This however, causes extra transformations "linking" during the application build since other Angular code in `@angular/platform-server` is pulled in. With this commit we remove the cross dependency and thus remove the need for extra transformations in the server polyfill bundle with the result of having a slightly faster build. See: https://github.com/angular/angular-cli/pull/26113 PR Close #52342
48 lines
951 B
Text
48 lines
951 B
Text
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
|
load("//tools:defaults.bzl", "esbuild", "ng_module", "tsec_test")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
ng_module(
|
|
name = "init",
|
|
srcs = glob(
|
|
[
|
|
"*.ts",
|
|
"src/**/*.ts",
|
|
],
|
|
exclude = ["src/bundled-domino.d.ts"],
|
|
),
|
|
deps = [
|
|
":bundled_domino_lib",
|
|
],
|
|
)
|
|
|
|
esbuild(
|
|
name = "bundled_domino",
|
|
entry_point = "@npm//:node_modules/domino/lib/index.js",
|
|
format = "esm",
|
|
output = "src/bundled-domino.mjs",
|
|
deps = ["@npm//domino"],
|
|
)
|
|
|
|
js_library(
|
|
name = "bundled_domino_lib",
|
|
srcs = [
|
|
"src/bundled-domino.d.ts",
|
|
":bundled_domino",
|
|
],
|
|
)
|
|
|
|
tsec_test(
|
|
name = "tsec_test",
|
|
target = "init",
|
|
tsconfig = "//packages:tsec_config",
|
|
)
|
|
|
|
filegroup(
|
|
name = "files_for_docgen",
|
|
srcs = glob([
|
|
"*.ts",
|
|
"src/**/*.ts",
|
|
]) + ["PACKAGE.md"],
|
|
)
|