Files
Matthew Beck 502fa130aa fix(docs-infra): ignore external links when mapping navigation items to routes
When navigation items contain external URLs (e.g. https:// links for documentation or third-party resources), mapNavigationItemsToRoutes previously registered them as Angular Router route definitions. In recent versions of @angular/build, the static prerender worker asserts that discovered routes do not return empty content during SSG prerendering, causing production builds and CI adev-deploy to fail on these routes.

This change filters out external links in mapNavigationItemsToRoutes so only valid internal application paths are registered as Angular routes.
2026-09-02 19:07:15 -07:00

41 lines
845 B
Python

load("//adev/shared-docs:defaults.bzl", "ts_project", "zoneless_web_test_suite")
package(default_visibility = ["//visibility:private"])
ts_project(
name = "utils",
srcs = glob(
[
"**/*.ts",
],
exclude = [
"**/*.spec.ts",
],
),
visibility = ["//adev/shared-docs:__subpackages__"],
deps = [
"//adev:node_modules/@angular/core",
"//adev:node_modules/@angular/router",
"//adev:node_modules/fflate",
"//adev/shared-docs/interfaces",
"//adev/shared-docs/providers",
],
)
ts_project(
name = "test_lib",
testonly = True,
srcs = glob(
["*.spec.ts"],
),
deps = [
":utils",
"//adev/shared-docs/interfaces",
],
)
zoneless_web_test_suite(
name = "test",
deps = [":test_lib"],
)