1

The app is dockerized and I am using traefik. It constantly reloads (every 3 seconds).

In the console I can see that the error is "Websocket connection to wss://mywebsite.com:3000/ failed".

If it helps, my vite.config.js is simply:

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
});

Thank you for your help!

1 Answer 1

1

I solved it by adding in vite.config.js the following:

server: {
    hmr: { clientPort: 443 },
  },

Hopefully it can help the next one with this issue!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.