diff --git a/packages/protractor/test/protractor-2/BUILD.bazel b/packages/protractor/test/protractor-2/BUILD.bazel index fb49f3e4ee..eaab43d62c 100644 --- a/packages/protractor/test/protractor-2/BUILD.bazel +++ b/packages/protractor/test/protractor-2/BUILD.bazel @@ -1,6 +1,7 @@ -load("@build_bazel_rules_nodejs//:index.bzl", "rollup_bundle") load("@npm//http-server:index.bzl", "http_server") load("@npm_bazel_protractor//:index.from_src.bzl", "protractor_web_test_suite") +load("@npm_bazel_rollup//:index.from_src.bzl", "rollup_bundle") +load("@npm_bazel_terser//:index.from_src.bzl", "terser_minified") load("@npm_bazel_typescript//:index.bzl", "ts_config") load("@npm_bazel_typescript//:index.from_src.bzl", "ts_devserver", "ts_library") @@ -16,6 +17,17 @@ ts_library( tsconfig = ":tsconfig.json", ) +rollup_bundle( + name = "bundle", + entry_point = ":app.ts", + deps = [":app"], +) + +terser_minified( + name = "bundle.min", + src = ":bundle", +) + ts_devserver( name = "devserver", serving_path = "/bundle.min.js", @@ -23,18 +35,11 @@ ts_devserver( deps = [":app"], ) -rollup_bundle( - name = "bundle", - enable_code_splitting = False, - entry_point = ":app.ts", - deps = [":app"], -) - http_server( name = "prodserver", data = [ "index.html", - ":bundle.min.js", + ":bundle.min", ], # This repeats the default, but is here for coverage # to make sure the generated index.bzl handles it