Passing WebSocket request from Sveltekit to Elysiajs

I have a backend server written with elysiajs, and I have integrated it with sveltekit app.
The problem is that the rest routes work as expected but the ws ones don’t because sveltekit do not support ws nativly, how could I intercept the ws request coming to the sveltekit app and pass them to elysia?

I have tried to write a vite plug in to transform the request, but that didn’t work