fix: Resolve socket mixed content error by making the socket connection URL environment-aware for production and development, and adding Vite client type definitions.
All checks were successful
Build and Deploy / build (push) Successful in 1m18s
All checks were successful
Build and Deploy / build (push) Successful in 1m18s
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
import { io, Socket } from 'socket.io-client';
|
||||
|
||||
const URL = `http://${window.location.hostname}:3000`;
|
||||
const URL = import.meta.env.PROD ? undefined : `http://${window.location.hostname}:3000`;
|
||||
|
||||
class SocketService {
|
||||
public socket: Socket;
|
||||
|
||||
Reference in New Issue
Block a user