diff --git a/.bazelrc b/.bazelrc index d8d7db62c..d573da1bf 100644 --- a/.bazelrc +++ b/.bazelrc @@ -58,3 +58,12 @@ build --strategy=AngularTemplateCompile=worker # Use the legacy AOT compiler strategy. We don't want to compile with Ivy nor with "ngtsc" which # does not generate factory files which are needed for AOT. build --define=compile=legacy + +############################### +# NodeJS rules settings +# These settings are required for rules_nodejs +############################### + +# Turn on managed directories feature in Bazel +# This allows us to avoid installing a second copy of node_modules +common --experimental_allow_incremental_repository_updates \ No newline at end of file diff --git a/WORKSPACE b/WORKSPACE index bbfb0bda4..2d471bc67 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,12 +1,15 @@ -workspace(name = "nguniversal") +workspace( + name = "nguniversal", + managed_directories = {"@npm": ["node_modules"]}, +) load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # Add NodeJS rules (explicitly used for sass bundle rules) http_archive( name = "build_bazel_rules_nodejs", - sha256 = "6d4edbf28ff6720aedf5f97f9b9a7679401bf7fca9d14a0fff80f644a99992b4", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.32.2/rules_nodejs-0.32.2.tar.gz"], + sha256 = "0d9660cf0894f1fe1e9840818553e0080fbce0851169812d77a70bdb9981c946", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.37.0/rules_nodejs-0.37.0.tar.gz"], ) # Setup the NodeJS toolchain