Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(esbuild): support location expansion in esbuild args (#2564)
When an esbuild rule is passed an argument like "--inject:path/in/repo.js", this works when building in the local workspace, as esbuild is invoked with the correct working directory. But if the esbuild rule is in a remote workspace (eg bazel build @other_workspace//path/in:esbuild_rule), then the path is no longer valid. By expanding $(location ...) references in provided arguments, it allows callers of the rule to pass arguments like the following, which work in both local and remote repo cases: esbuild(args = ["--inject:$(location //path/in:repo.js)"], ...)
- Loading branch information