We do support this in js.Batch, but js.Build and the upcoming css.Build returns a single Resource.
This relates to my work in #14610, but I create an issue here for discoverability.
For CSS, the use case is typically loading of e.g. ttf fonts and e.g.
body {
background-image: url("a/pixel.png");
}
I'm not prepared to overcomplicate this, so I'm going to do it the same way we handle source maps: Write the files relative to the stylesheet inside /public.
There would be no way to e.g. process these images, but ESBuild will insert a hash, so that's good.
/cc @jmooring
We do support this in
js.Batch, butjs.Buildand the upcomingcss.Buildreturns a singleResource.This relates to my work in #14610, but I create an issue here for discoverability.
For CSS, the use case is typically loading of e.g. ttf fonts and e.g.
I'm not prepared to overcomplicate this, so I'm going to do it the same way we handle source maps: Write the files relative to the stylesheet inside
/public.There would be no way to e.g. process these images, but ESBuild will insert a hash, so that's good.
/cc @jmooring