A small test repo playing with different ways to integrate sveltekit with various other techs like ExpressJs and Socket.io.
-
Express as Vite Middleware Right now, we're playing with
vite-plugin-mix
which takes theapp
object from an express server and transforms it into Vite middleware. It currently has a bug during the build step, so we're waiting on that. -
Typescript Websockets
Socket.io
plays nicely as Vite plugin already. See$lib/socket.ts
. -
Sveltekit as Express middleware, but without having to build during dev Haven't dug into this part much yet. Ideas/questions:
- Can we import
handler
from the.svelte-kit
folder in dev? - Can we extend nodemon's watch directory so it restarts when changes are made in sveltekit?
yarn install
yarn dev
# This currently throws an error. TODO: I'll find the github issue later.
yarn build