Middleware #218
Replies: 3 comments
-
Quick reply: In your const myServerPlugin = () => ({
name: 'configure-server',
configureServer(server) {
// do something to the server
},
})
export default defineConfig({
plugins: [
one(/* ... */),
myServerPlugin(),
],
}) But I can think of a few issues that may make this unusable for your case:
I think we should take a deeper look soon, maybe tomorrow. |
Beta Was this translation helpful? Give feedback.
-
We're on the way of removing the internal h3 server. #210 #199 |
Beta Was this translation helpful? Give feedback.
-
h3 is removed now so it's all Vite. We do need a generic way for people to hook into the server in both dev and prod. Vite doesn't provide this so maybe we should work with them a bit, but some basic middleware support would be nice. Ideally we can make it typed (Tanstack does good stuff here). |
Beta Was this translation helpful? Give feedback.
-
I need to setup a websocket server, and I need access to the server instance to create it.
https://github.com/enisdenjo/graphql-ws
For example...
How can I access the
onestackServerInstance
?Beta Was this translation helpful? Give feedback.
All reactions