build(bazel): turn on preserve-symlinks (#24881)

This change turns on preserve-symlinks in nodejs to verify hermeticity of the Angular build.

BREAKING CHANGE: Use of @angular/bazel rules now requires calling ng_setup_workspace() in your WORKSPACE file.

For example:

local_repository(
    name = "angular",
    path = "node_modules/@angular/bazel",
)

load("@angular//:index.bzl", "ng_setup_workspace")

ng_setup_workspace()

PR Close #24881
This commit is contained in:
Greg Magolan
2018-05-10 23:35:21 -07:00
committed by Victor Berchet
parent 70b51a6255
commit c438b5eeda
14 changed files with 389 additions and 81 deletions

View File

@ -78,7 +78,10 @@ http_archive(
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
check_bazel_version("0.15.0")
node_repositories(package_json = ["//:package.json"])
node_repositories(
package_json = ["//:package.json"],
preserve_symlinks = True,
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
@ -97,6 +100,10 @@ load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
ts_setup_workspace()
load("//packages/bazel/src:ng_setup_workspace.bzl", "ng_setup_workspace")
ng_setup_workspace()
#
# Point Bazel to WORKSPACEs that live in subdirectories
#