fix: support forwarded dev server refresh
This commit is contained in:
@@ -12,8 +12,8 @@ const SERVER_ROOT = path.dirname(fileURLToPath(import.meta.url));
|
||||
export async function setupVite(app: Express, server: Server) {
|
||||
const serverOptions = {
|
||||
middlewareMode: true,
|
||||
// Disable Vite client-side auto reload/HMR in dev.
|
||||
hmr: false as const,
|
||||
// Reuse the app HTTP server for HMR so SSH forwarding only needs the app port.
|
||||
hmr: { server },
|
||||
allowedHosts: true as const,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user