Open clayrisser opened 1 day ago
Quick reply: In your vite.config.*
, you can add a custom plugin with a configureServer
hook to access the Vite dev server instance and extend its functionality.
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.
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
?