angular/packages/platform-browser/BUILD.bazel
Andrew Kushnir 3bcbfecb78 refactor(platform-browser): log a warning when a custom or a noop ZoneJS is used with hydration (#49944)
Hydration relies on a signal from ZoneJS when it becomes stable inside an application, so that Angular can start serialization process on the server or post-hydration cleanup on the client (to remove DOM nodes that remained unclaimed).

Providing a custom or a "noop" ZoneJS implementation may lead to a different timing of the "stable" event, thus triggering the serialization or the cleanup too early or too late. This is not yet a fully supported configuration.

This commit adds a warning (non-blocking) for those cases.

PR Close #49944
2023-04-23 18:23:28 -07:00

81 lines
2 KiB
Text

load("//tools:defaults.bzl", "api_golden_test", "api_golden_test_npm_package", "ng_module", "ng_package", "tsec_test")
package(default_visibility = ["//visibility:public"])
ng_module(
name = "platform-browser",
package_name = "@angular/platform-browser",
srcs = glob(
[
"*.ts",
"src/**/*.ts",
],
),
deps = [
"//packages:types",
"//packages/common",
"//packages/common/http",
"//packages/core",
"//packages/zone.js/lib:zone_d_ts",
"@npm//@types/hammerjs",
],
)
tsec_test(
name = "tsec_test",
target = "platform-browser",
tsconfig = "//packages:tsec_config",
)
ng_package(
name = "npm_package",
srcs = [
"package.json",
],
tags = [
"release-with-framework",
],
# Do not add more to this list.
# Dependencies on the full npm_package cause long re-builds.
visibility = [
"//aio:__pkg__",
"//aio/content/examples:__subpackages__",
"//aio/tools/examples:__pkg__",
"//integration:__subpackages__",
"//packages/compiler-cli/integrationtest:__pkg__",
"//packages/compiler-cli/test:__pkg__",
],
deps = [
":platform-browser",
"//packages/platform-browser/animations",
"//packages/platform-browser/testing",
],
)
api_golden_test_npm_package(
name = "platform-browser_api",
data = [
":npm_package",
"//goldens:public-api",
],
golden_dir = "angular/goldens/public-api/platform-browser",
npm_package = "angular/packages/platform-browser/npm_package",
)
api_golden_test(
name = "platform-browser_errors",
data = [
"//goldens:public-api",
"//packages/platform-browser",
],
entry_point = "angular/packages/platform-browser/src/errors.d.ts",
golden = "angular/goldens/public-api/platform-browser/errors.md",
)
filegroup(
name = "files_for_docgen",
srcs = glob([
"*.ts",
"src/**/*.ts",
]) + ["PACKAGE.md"],
)