Open kravetsone opened 3 weeks ago
1.0.23
Microsoft Windows NT 10.0.22631.0 x64
It broke my elysia-autoload plugin
elysia-autoload
Your code for it https://github.com/elysiajs/elysia/blob/8a5871b1a96ebe5c6957310f8e2848064e441f09/src/index.ts#L2697-L2705
function somePlugin() { return async () => new Elysia().ws("/ws", { message(ws, message) { ws.send(message); }, }); } export const app = new Elysia() .use(somePlugin()); app.listen(3002, () => console.log("started"));
When i remove async from function it works fine
function somePlugin() { return () => new Elysia().ws("/ws", { message(ws, message) { ws.send(message); }, }); } export const app = new Elysia() .use(somePlugin()); app.listen(3002, () => console.log("started"));
it works fine too
async function somePlugin() { return new Elysia().ws("/ws", { message(ws, message) { ws.send(message); }, }); } export const app = new Elysia() .use(somePlugin()); app.listen(3002, () => console.log("started"));
it seems to me that this issue is deeper than it seems and may affect https://github.com/kravetsone/elysia-autoload/issues/10 and https://github.com/kravetsone/elysia-autoload/issues/8 and other plugins are connected, but I haven't been able to get to the truth yet.
No response
What version of Elysia.JS is running?
1.0.23
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What steps can reproduce the bug?
It broke my
elysia-autoload
pluginYour code for it https://github.com/elysiajs/elysia/blob/8a5871b1a96ebe5c6957310f8e2848064e441f09/src/index.ts#L2697-L2705
When i remove async from function it works fine
it works fine too
it seems to me that this issue is deeper than it seems and may affect https://github.com/kravetsone/elysia-autoload/issues/10 and https://github.com/kravetsone/elysia-autoload/issues/8 and other plugins are connected, but I haven't been able to get to the truth yet.
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response