Guest User

SvelteKit SocketIO Vite Config

a guest
Sep 19th, 2022
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // vite.config.js
  2. import { sveltekit } from "@sveltejs/kit/vite";
  3.  
  4. const config = {
  5.   plugins: [
  6.     sveltekit(),
  7.     {
  8.       name: "sveltekit-socket-io",
  9.       configureServer(server) {
  10.         injectSocketIO(server.httpServer); // <- call the function here
  11.       },
  12.     },
  13.   ],
  14. };
  15.  
  16. export default config;
Advertisement
Add Comment
Please, Sign In to add comment