From 8313ffc38deae8706255056f4f51992f3325a4c8 Mon Sep 17 00:00:00 2001 From: Keen Yee Liau Date: Tue, 11 Dec 2018 16:44:17 -0800 Subject: [PATCH] fix(bazel): Load http_archive and rules_nodejs dependencies (#27609) Bazel 0.20 requires loading http_archive explicitly. rules_nodejs dependencies must now be installed explicity as well. PR Close #27609 --- .../src/schematics/bazel-workspace/files/WORKSPACE.template | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/bazel/src/schematics/bazel-workspace/files/WORKSPACE.template b/packages/bazel/src/schematics/bazel-workspace/files/WORKSPACE.template index def596f5a1..393f2947d1 100644 --- a/packages/bazel/src/schematics/bazel-workspace/files/WORKSPACE.template +++ b/packages/bazel/src/schematics/bazel-workspace/files/WORKSPACE.template @@ -10,6 +10,8 @@ # imports also make sense when referencing the published package. workspace(name = "<%= utils.underscore(name) %>") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + # The @angular repo contains rule for building Angular applications # Provides "build_bazel_rules_typescript" ANGULAR_VERSION = "<%= ANGULAR_VERSION %>" @@ -45,6 +47,9 @@ load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependenci rules_typescript_dependencies() # build_bazel_rules_nodejs is loaded transitively through rules_typescript_dependencies. +load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dependencies") +rules_nodejs_dependencies() + load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install") # 0.18.0 is needed for .bazelignore check_bazel_version("0.18.0")