import { io } from 'socket.io-client'; // In development, Vite proxies /socket.io to the server. // In production, both are served from the same origin. const socket = io({ autoConnect: true, reconnection: true, reconnectionAttempts: Infinity, reconnectionDelay: 1000, reconnectionDelayMax: 5000, }); export default socket;