Open ghost opened 5 months ago
1.0.9
Linux 5.15.0-101-generic x86_64 x86_64
const { outputs: [file] } = await Bun.build(/* build something that outputs js file */) new Elysia().get('/', file);
Lets say that file is a js file, then the Content-Type should be text/javascript...
file
Content-Type
text/javascript...
Content-Type: application/json;charset=utf-8 Content-Length: 2 the file way bigger than that
Content-Type: application/json;charset=utf-8
Content-Length: 2
Elysia should handle BuildArtifact properly, since BuildArtifact is an extension of BunFile.
Workaround:
new Elysia().get('/', Bun.file(file.path));
I took a look at how you guys deal with literal values. The problem is that BuildArtifact.constructor.name happens to be Object instead of Blob.
BuildArtifact.constructor.name
Object
Blob
What version of Elysia.JS is running?
1.0.9
What platform is your computer?
Linux 5.15.0-101-generic x86_64 x86_64
What steps can reproduce the bug?
What is the expected behavior?
Lets say that
file
is a js file, then theContent-Type
should betext/javascript...
What do you see instead?
Content-Type: application/json;charset=utf-8
Content-Length: 2
the file way bigger than thatAdditional information
Elysia should handle BuildArtifact properly, since BuildArtifact is an extension of BunFile.
Workaround: