diff --git a/integration/bazel/WORKSPACE b/integration/bazel/WORKSPACE index cdadd41e0d..628918064d 100644 --- a/integration/bazel/WORKSPACE +++ b/integration/bazel/WORKSPACE @@ -8,19 +8,16 @@ 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 = "3887b948779431ac443e6a64f31b9e1e17b8d386a31eebc50ec1d9b0a6cabd2b", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.0.0/rules_nodejs-1.0.0.tar.gz"], + sha256 = "9901bc17138a79135048fb0c107ee7a56e91815ec6594c08cb9a17b80276d62b", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.40.0/rules_nodejs-0.40.0.tar.gz"], ) # Fetch sass rules for compiling sass files http_archive( name = "io_bazel_rules_sass", - 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", - ], + sha256 = "4f05239080175a3f4efa8982d2b7775892d656bb47e8cf56914d5f9441fb5ea6", + strip_prefix = "rules_sass-86ca977cf2a8ed481859f83a286e164d07335116", + url = "https://github.com/bazelbuild/rules_sass/archive/86ca977cf2a8ed481859f83a286e164d07335116.zip", ) # Check the bazel version and download npm dependencies diff --git a/integration/bazel/package.json b/integration/bazel/package.json index fdf37a8159..047b13fb2b 100644 --- a/integration/bazel/package.json +++ b/integration/bazel/package.json @@ -23,26 +23,18 @@ "@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": "1.0.0", - "@bazel/protractor": "1.0.0", - "@bazel/rollup": "1.0.0", - "@bazel/terser": "1.0.0", - "@bazel/typescript": "1.0.0", + "@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", "@types/jasmine": "2.8.8", - "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", + "http-server": "0.11.1", + "rollup": "1.25.2", "rollup-plugin-commonjs": "10.1.0", "rollup-plugin-node-resolve": "5.2.0", "rollup-plugin-sourcemaps": "0.4.2", - "terser": "4.4.0", + "terser": "4.3.9", "typescript": "3.6.4" }, "scripts": { diff --git a/integration/bazel/src/BUILD.bazel b/integration/bazel/src/BUILD.bazel index 033b70f429..b5fa77975b 100644 --- a/integration/bazel/src/BUILD.bazel +++ b/integration/bazel/src/BUILD.bazel @@ -1,8 +1,8 @@ package(default_visibility = ["//visibility:public"]) -load("@build_bazel_rules_nodejs//:index.bzl", "pkg_web") -load("@npm//http-server:index.bzl", "http_server") load("@npm_angular_bazel//:index.bzl", "ng_module") +load("@npm//http-server:index.bzl", "http_server") +load("@build_bazel_rules_nodejs//internal/web_package:web_package.bzl", "web_package") 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,16 +36,13 @@ 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"], @@ -67,14 +64,14 @@ terser_minified( src = ":bundle", ) -pkg_web( +web_package( name = "prodapp", - srcs = [ - "index.html", - ":bundle.min", + assets = [ + # do not sort "@npm//:node_modules/zone.js/dist/zone.min.js", + ":bundle.min", ], - additional_root_paths = ["npm/node_modules/zone.js/dist"], + index_html = "index.html", ) http_server( diff --git a/integration/bazel/src/index.html b/integration/bazel/src/index.html index f1bbe5db37..f4ab9d187d 100644 --- a/integration/bazel/src/index.html +++ b/integration/bazel/src/index.html @@ -9,7 +9,5 @@