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

Specify loader inline in import #5519

Open
robobun opened this issue Sep 15, 2023 · 1 comment
Open

Specify loader inline in import #5519

robobun opened this issue Sep 15, 2023 · 1 comment
Labels
bun.js Something to do with a Bun-specific API enhancement New feature or request

Comments

@robobun
Copy link

robobun commented Sep 15, 2023

I want to inline a JS file into the build of an executable and resolve its url embedded path

Originally reported on Discord: Can you specify a loader to use for an import?

@colinhacks
Copy link
Contributor

colinhacks commented Sep 16, 2023

Proposed syntax. Kinda Vite-like.

import thing from "./x.js?loader=file`

Might also be a place where we could use import attributes.

import thing from "./x.js` with {loader: 'file'}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bun.js Something to do with a Bun-specific API enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants