mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
502fa130aa
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.
41 lines
845 B
Python
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"],
|
|
)
|