Commit graph

8 commits

Author SHA1 Message Date
Damien Elmes
2e1104c724 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
443ee54f7e Unsuccessfully try to add text loader for .svg files 2021-03-28 16:14:52 +02:00
Damien Elmes
3761693be2 add links to pending PRs 2021-03-28 12:32:40 +10:00
Damien Elmes
0b2c3e1c3b 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
061c7e60fc add esbuild/helpers.bzl in from upstream 2021-03-28 11:12:23 +10:00
Damien Elmes
7500a2765f support expanding locations in esbuild arguments 2021-03-28 09:35:27 +10:00
Damien Elmes
2ffb210ca4 add support for declaring css output in esbuild call 2021-03-21 16:06:36 +10:00
Damien Elmes
d5c088175f 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