You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing the same problem when using @elysiajs/html with @elysiajs/static. As a temporary workaround, I created an assets endpoint with a wildcard and use Bun.file to retrieve them.
//index.jsximport{Elysia,t}from'elysia';import{html}from"@elysiajs/html";newElysia().use(html()).get('/assets/*',({ set, params })=>{constfile=Bun.file(`${import.meta.dir}/assets/${params['*']}`);set.headers['Content-Type']=file.type;returnfile.text();}).get('/',()=>{return(<htmllang='en'><head><scriptsrc="assets/js/htmx.min.js"/></head><body><formhx-post="/"hx-swap="afterend"><inputtype="text"name="name"/><buttontype='submit'>ClickMe!</button></form></body></html>)}).post('/',({ body })=>{return(<script>alert("{body.name}!")</script>);
},{body: t.Object({name: t.String()})}).listen(9999,({ port })=>{console.log(`Server is running on port ${port}`)});
But I think the segmentation fault is related to Bun.
What version of Elysia.JS is running?
1.0.0-beta.14
What platform is your computer?
Linux 6.7.9-zen1-1-zen x86_64 unknown
What steps can reproduce the bug?
What is the expected behavior?
fetching data with flags: [ "--watch" ] got data: foo fetching data with flags: [] got data: foo
What do you see instead?
fetching data with flags: [ "--watch" ] got data: foo fetching data with flags: []
Additional information
Same issue on v0.8.x of Elysia
Adding
--watch
or--hot
flags tobun run
works around the issueThe text was updated successfully, but these errors were encountered: