diff --git a/integration/bazel/WORKSPACE b/integration/bazel/WORKSPACE index 628918064d..cdadd41e0d 100644 --- a/integration/bazel/WORKSPACE +++ b/integration/bazel/WORKSPACE @@ -8,16 +8,19 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # Fetch rules_nodejs so we can install our npm dependencies http_archive( name = "build_bazel_rules_nodejs", - sha256 = "9901bc17138a79135048fb0c107ee7a56e91815ec6594c08cb9a17b80276d62b", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.40.0/rules_nodejs-0.40.0.tar.gz"], + sha256 = "3887b948779431ac443e6a64f31b9e1e17b8d386a31eebc50ec1d9b0a6cabd2b", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.0.0/rules_nodejs-1.0.0.tar.gz"], ) # Fetch sass rules for compiling sass files http_archive( name = "io_bazel_rules_sass", - sha256 = "4f05239080175a3f4efa8982d2b7775892d656bb47e8cf56914d5f9441fb5ea6", - strip_prefix = "rules_sass-86ca977cf2a8ed481859f83a286e164d07335116", - url = "https://github.com/bazelbuild/rules_sass/archive/86ca977cf2a8ed481859f83a286e164d07335116.zip", + sha256 = "77e241148f26d5dbb98f96fe0029d8f221c6cb75edbb83e781e08ac7f5322c5f", + strip_prefix = "rules_sass-1.24.0", + urls = [ + "https://github.com/bazelbuild/rules_sass/archive/1.24.0.zip", + "https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/1.24.0.zip", + ], ) # Check the bazel version and download npm dependencies diff --git a/integration/bazel/package.json b/integration/bazel/package.json index 047b13fb2b..fdf37a8159 100644 --- a/integration/bazel/package.json +++ b/integration/bazel/package.json @@ -23,18 +23,26 @@ "@angular/compiler": "file:../../dist/packages-dist/compiler", "@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", "@bazel/bazel": "file:../../node_modules/@bazel/bazel", - "@bazel/karma": "0.40.0", - "@bazel/protractor": "0.40.0", - "@bazel/rollup": "0.40.0", - "@bazel/terser": "0.40.0", - "@bazel/typescript": "0.40.0", + "@bazel/karma": "1.0.0", + "@bazel/protractor": "1.0.0", + "@bazel/rollup": "1.0.0", + "@bazel/terser": "1.0.0", + "@bazel/typescript": "1.0.0", "@types/jasmine": "2.8.8", - "http-server": "0.11.1", - "rollup": "1.25.2", + "http-server": "0.12.0", + "karma": "4.4.1", + "karma-chrome-launcher": "3.1.0", + "karma-firefox-launcher": "1.2.0", + "karma-jasmine": "2.0.1", + "karma-requirejs": "1.1.0", + "karma-sourcemap-loader": "0.3.7", + "protractor": "5.4.2", + "requirejs": "2.3.6", + "rollup": "1.27.5", "rollup-plugin-commonjs": "10.1.0", "rollup-plugin-node-resolve": "5.2.0", "rollup-plugin-sourcemaps": "0.4.2", - "terser": "4.3.9", + "terser": "4.4.0", "typescript": "3.6.4" }, "scripts": { diff --git a/integration/bazel/src/BUILD.bazel b/integration/bazel/src/BUILD.bazel index b5fa77975b..033b70f429 100644 --- a/integration/bazel/src/BUILD.bazel +++ b/integration/bazel/src/BUILD.bazel @@ -1,8 +1,8 @@ package(default_visibility = ["//visibility:public"]) -load("@npm_angular_bazel//:index.bzl", "ng_module") +load("@build_bazel_rules_nodejs//:index.bzl", "pkg_web") load("@npm//http-server:index.bzl", "http_server") -load("@build_bazel_rules_nodejs//internal/web_package:web_package.bzl", "web_package") +load("@npm_angular_bazel//:index.bzl", "ng_module") load("@npm_bazel_rollup//:index.bzl", "rollup_bundle") load("@npm_bazel_terser//:index.bzl", "terser_minified") load("@npm_bazel_typescript//:index.bzl", "ts_devserver") @@ -36,13 +36,16 @@ filegroup( ts_devserver( name = "devserver", + additional_root_paths = ["npm/node_modules/zone.js/dist"], entry_module = "bazel_integration_test/src/main", - index_html = "index.html", scripts = [ ":rxjs_umd_modules", ], + # Use the same bundle serving path as prodserver so that we can share + # an index.html file. serving_path = "/bundle.min.js", static_files = [ + "index.html", "@npm//:node_modules/zone.js/dist/zone.min.js", ], deps = ["//src"], @@ -64,14 +67,14 @@ terser_minified( src = ":bundle", ) -web_package( +pkg_web( name = "prodapp", - assets = [ - # do not sort - "@npm//:node_modules/zone.js/dist/zone.min.js", + srcs = [ + "index.html", ":bundle.min", + "@npm//:node_modules/zone.js/dist/zone.min.js", ], - index_html = "index.html", + additional_root_paths = ["npm/node_modules/zone.js/dist"], ) http_server( diff --git a/integration/bazel/src/index.html b/integration/bazel/src/index.html index f4ab9d187d..f1bbe5db37 100644 --- a/integration/bazel/src/index.html +++ b/integration/bazel/src/index.html @@ -9,5 +9,7 @@