Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR]: --loader option #103

Open
1 task
tamuhey opened this issue Nov 26, 2022 · 2 comments
Open
1 task

[FR]: --loader option #103

tamuhey opened this issue Nov 26, 2022 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@tamuhey
Copy link

tamuhey commented Nov 26, 2022

What is the current behavior?

Not sure how to use --loader option, e.g. --loader:.svg=text

Describe the feature

Allow users to set --loader:.svg=text

Fund our work

@tamuhey tamuhey added the enhancement New feature or request label Nov 26, 2022
@gregmagolan gregmagolan added this to the 1.0 milestone Mar 27, 2023
@gregmagolan
Copy link
Member

Likely just need an example of how to use --loader

@Place1
Copy link

Place1 commented Mar 28, 2023

here's a quick example in case somebody would like to use it to contribute a proper example:

esbuild(
    name = "bundle",
    srcs = [":src"],
    config = {
        "loader": {
            ".ttf": "file",
        },
    },
    entry_point = "src/index.js",
)

The "config" parameter seems to accept a dictionary matching the JSON options for the esbuild js api: https://esbuild.github.io/content-types/#file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: On Deck
Development

No branches or pull requests

3 participants