Commit Graph

8 Commits

Author SHA1 Message Date
Damien Elmes
f1780e6e24 move loader arg into esbuild() invocation
upstream.bzl should be kept as close to upstream as possible, so that
it's easier to send changes upstream and pull in future changes
2021-03-29 17:59:06 +10:00
Henrik Giesel
3a44ffe2bb Unsuccessfully try to add text loader for .svg files 2021-03-28 16:14:52 +02:00
Damien Elmes
f3a3bb5467 add links to pending PRs 2021-03-28 12:32:40 +10:00
Damien Elmes
559d1a4793 fix(esbuild): files not being found when building external repo
An esbuild rule that ran fine in a local repo (eg bazel build //:my_esbuild_rule)
fails when built externally (eg bazel build @other_workspace//:my_esbuild_rule).
By prepending the workspace root to the bin path, the resulting base
URL works correctly in both local and remote repo invocations, allowing
esbuild output to be consumed by a different repo.

This change fixes remote repos in Bazel 4.0.0. 3.7.0 seems to require a
workspace_root.replace("external/", "") call first in order
to get the correct location. So while this patch should not break anything
that was not already broken, it only fixes/adds support for remote repos
in 4.0+.
2021-03-28 11:30:15 +10:00
Damien Elmes
08fd7a4747 add esbuild/helpers.bzl in from upstream 2021-03-28 11:12:23 +10:00
Damien Elmes
944528d462 support expanding locations in esbuild arguments 2021-03-28 09:35:27 +10:00
Damien Elmes
1e14384d88 add support for declaring css output in esbuild call 2021-03-21 16:06:36 +10:00
Damien Elmes
860ae5464c add upstream esbuild impl so we can add css output support
Taken from 4a26898023/packages/esbuild/esbuild.bzl
2021-03-21 16:06:36 +10:00