-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Custom extension for Text Loader #5710
Labels
Comments
@robobun You can achieve this by returning an object with an For example: import { plugin } from "bun";
plugin({
name: "Env",
async setup(build) {
build.onLoad({ filter: /\.env\.example/ }, async (args) => {
return {
exports: { default: await Bun.file(args.path).arrayBuffer() },
loader: 'object',
};
})
},
}); |
Electroid
added
bug
Something isn't working
needs investigate
Needs to be investigated to find the root cause
labels
Oct 28, 2023
You can do |
Jarred-Sumner
added a commit
that referenced
this issue
Apr 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
I would like to be able to import
.env.example
files with the standard module import syntax:I tried to use a custom loader:
Which resulted in the following error:
Originally reported on Discord:
Custom extension for Text Loader
The text was updated successfully, but these errors were encountered: