From 64823f561c2c25f05e9bce04de68374ce997548a Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Sat, 5 Oct 2019 09:12:47 -0700 Subject: [PATCH] build: add history-server to @angular/bazel schematics (#32889) The history_server rule is not longer shipped with rules_nodejs as it has been replaced by auto-generated rule `load("@npm//history-server:index.bzl", "history_server")` which requires the user to add history-server to their package.json. PR Close #32889 --- packages/bazel/src/builders/files/src/BUILD.bazel.template | 3 ++- packages/bazel/src/schematics/ng-add/index.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/bazel/src/builders/files/src/BUILD.bazel.template b/packages/bazel/src/builders/files/src/BUILD.bazel.template index 8eff34d862..ea9f10ad0b 100644 --- a/packages/bazel/src/builders/files/src/BUILD.bazel.template +++ b/packages/bazel/src/builders/files/src/BUILD.bazel.template @@ -2,8 +2,9 @@ package(default_visibility = ["//visibility:public"]) load("@npm_angular_bazel//:index.bzl", "ng_module") load("@npm_bazel_karma//:index.bzl", "ts_web_test_suite") -load("@build_bazel_rules_nodejs//:index.bzl", "rollup_bundle", "history_server") +load("@build_bazel_rules_nodejs//:index.bzl", "rollup_bundle") load("@build_bazel_rules_nodejs//internal/web_package:web_package.bzl", "web_package") +load("@npm//history-server:index.bzl", "history_server") load("@npm_bazel_typescript//:index.bzl", "ts_devserver", "ts_library") load("@io_bazel_rules_sass//:defs.bzl", "multi_sass_binary", "sass_binary") diff --git a/packages/bazel/src/schematics/ng-add/index.ts b/packages/bazel/src/schematics/ng-add/index.ts index cff0630cec..2cca75c314 100755 --- a/packages/bazel/src/schematics/ng-add/index.ts +++ b/packages/bazel/src/schematics/ng-add/index.ts @@ -53,6 +53,7 @@ function addDevDependenciesToPackageJson(options: Schema) { '@bazel/karma': '0.38.1', '@bazel/protractor': '0.38.1', '@bazel/typescript': '0.38.1', + 'history-server': '^1.3.1', }; const recorder = host.beginUpdate(packageJson);