Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add support for ESBuild's file loader in js.Build and css.Build #14613

@bep

Description

@bep

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

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions