@pzmosquito can you please share your full config?
I've managed to get this to not reload. The WS never connects, but at least it doesn't reload and I can use non-built/non-minified JS/TS(x) files.
server: {
// host: '0.0.0.0',
// https: true,
hmr: {
host: 'ad345ds2.ngrok.io',
// port: 443,
// protocol: 'wss',
},
},
Uncommenting https or port makes Vite enter the endless reloading loop.
PS I'm using ngrok tunnel.
import path from "path";
import { defineConfig } from "vite";
import reactRefresh from "@vitejs/plugin-react-refresh";
export default defineConfig({
mode: "development",
resolve: {
alias: {
_: path.resolve(__dirname, "src"),
},
},
plugins: [
reactRefresh(),
],
clearScreen: false,
server: {
host: "0.0.0.0",
port: 3000,
strictPort: true,
hmr: {
port: 443,
},
},
});
need to set strictPort=true, thanks a lot
Originally posted by @blakeyi in vitejs/vite#4259 (comment)
need to set strictPort=true, thanks a lot
Originally posted by @blakeyi in vitejs/vite#4259 (comment)