Running
esbuild index.css --bundle --outdir=build --entry-names=styles/[name] --asset-names=assets/[name] --loader:.png=file
with index.css looking like
.foobar {
background-image: url(./foobar.png);
}
results in build/styles/index.css:
/* index.css */
.foobar {
background-image: url(./assets/foobar.png);
}
Since foobar.png is copied to build/assets/foobar.png the URL should actually be ../assets/foobar.png?
Running
with
index.csslooking likeresults in
build/styles/index.css:Since
foobar.pngis copied tobuild/assets/foobar.pngthe URL should actually be../assets/foobar.png?