From 944528d4623a9def18e8484300d0e7c0c5af75da Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 28 Mar 2021 09:35:27 +1000 Subject: [PATCH] support expanding locations in esbuild arguments --- ts/esbuild/upstream.bzl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ts/esbuild/upstream.bzl b/ts/esbuild/upstream.bzl index eebd74a63..dfd5739c8 100644 --- a/ts/esbuild/upstream.bzl +++ b/ts/esbuild/upstream.bzl @@ -101,7 +101,7 @@ def _esbuild_impl(ctx): args.add_joined(["--tsconfig", jsconfig_file.path], join_with = "=") inputs.append(jsconfig_file) - args.add_all(ctx.attr.args) + args.add_all([ctx.expand_location(arg) for arg in ctx.attr.args]) ctx.actions.run( inputs = inputs, @@ -122,7 +122,8 @@ esbuild = rule( attrs = { "args": attr.string_list( default = [], - doc = "A list of extra arguments that are included in the call to esbuild", + doc = """A list of extra arguments that are included in the call to esbuild. + $(location ...) can be used to resolve the path to a Bazel target.""", ), "define": attr.string_list( default = [],