Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(esbuild): support location expansion in esbuild args #2564

Merged
merged 1 commit into from
Mar 30, 2021

Commits on Mar 28, 2021

  1. feat(esbuild): support location expansion in esbuild args

    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)"], ...)
    dae committed Mar 28, 2021
    Configuration menu
    Copy the full SHA
    aee036d View commit details
    Browse the repository at this point in the history