I have this weird error lately:
Firefox can’t establish a connection to the server at wss://127.0.0.1:5173/. client.ts:78:17
[vite] failed to connect to websocket.
your current setup:
(browser) 127.0.0.1:5173/ <--[HTTP]--> 127.0.0.1:5173/ (server)
(browser) 127.0.0.1:5173/ <--[WebSocket (failing)]--> 127.0.0.1:5173/ (server)
Check out your Vite / network configuration and https://vitejs.dev/config/server-options.html#server-hmr . client.ts:48:16
I have tried some things with my vite config:
import laravel from 'laravel-vite-plugin';
const host = 'nik.test'
export default defineConfig({
plugins: [
laravel({
host,
hmr: false,
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
],
});
But it doesn't work. Any suggestions?