Skip to content

Commit

Permalink
fix(bazel): unable to set tags for app_bundle rule due to conflict
Browse files Browse the repository at this point in the history
Fixes that no tags can be specified for `app_bundle` benchmark
targets due to a conflict with the debug target and its tags.
  • Loading branch information
devversion committed Dec 14, 2021
1 parent edafc47 commit 8f9c560
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bazel/benchmark/app_bundling/index.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ def app_bundle(
visibility = visibility,
)

common_esbuild_options = dict(kwargs, **{
common_esbuild_options = {
"config": "%s_esbuild_config" % name,
"entry_point": entry_point,
"target": target,
"platform": platform,
"format": format,
"sourcemap": "external",
"visibility": visibility,
})
}

common_terser_options = {
"visibility": visibility,
Expand All @@ -86,14 +86,13 @@ def app_bundle(
esbuild(
name = name,
args = _create_esbuild_minify_options(False),
**common_esbuild_options
**dict(kwargs, **common_esbuild_options)
)

esbuild(
name = "%s.debug" % name,
args = _create_esbuild_minify_options(True),
tags = ["manual"],
**common_esbuild_options
**dict(kwargs, tags = ["manual"], **common_esbuild_options)
)

terser_minified(name = name + ".min", src = name + ".js", **common_terser_options)
Expand Down
1 change: 1 addition & 0 deletions bazel/benchmark/app_bundling/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ng_module(
app_bundle(
name = "bundle",
entry_point = "main_fixture.ts",
tags = ["some-test-tag"],
deps = [":test_fixture_lib"],
)

Expand Down

0 comments on commit 8f9c560

Please sign in to comment.