SolidJSS
SolidJS2y ago
1 reply
ap32

Hmr doesn't work with custom port

Everything works fine when I use default hmr settings. But it stops working when I configure the port.
import { defineConfig } from "@solidjs/start/config";
import UnoCSS from "unocss/vite";

export default defineConfig({
  vite: {
    server: {
      port: 3000,
      strictPort: true,
      hmr: {
        port: 64314
      }
      // hmr: {
      //   protocol: "wss",
      //   port: 22300,
      //   clientPort: 443,
      //   path: "hmr/"
      // },
    },
    plugins: [UnoCSS()],
  },
});


It also writes Websocket socket error:
vinxi v0.3.10
vinxi starting dev server
WebSocket server error: Port is already in use
WebSocket server error: Port is already in use (x2)

  ➜ Local:    http://localhost:3000/
  ➜ Network:  use --host to expose


I need this to be able to work with code in a docker container
Was this page helpful?