From 12cf02be285ce7011f52568cc3ce8fcd92916a5a Mon Sep 17 00:00:00 2001 From: Casey Dyer Date: Thu, 13 Jun 2024 14:42:12 -0700 Subject: [PATCH] fix: adjust Caddy to support vite HMR --- Caddyfile | 4 ++++ vite.config.js | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/Caddyfile b/Caddyfile index 2e5714a398..8eaf3e5139 100644 --- a/Caddyfile +++ b/Caddyfile @@ -5,3 +5,7 @@ kiva-ui.local { reverse_proxy localhost:8888 } + +kiva-ui.local:24679 { + reverse_proxy localhost:24678 +} diff --git a/vite.config.js b/vite.config.js index c9c2543d67..07a02b2138 100644 --- a/vite.config.js +++ b/vite.config.js @@ -111,4 +111,11 @@ export default defineConfig({ }, extensions: ['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json', '.vue'], }, + server: { + hmr: { + // Use a different client port to allow Caddy to reverse proxy with SSL cert + clientPort: 24679, + port: 24678, + }, + }, });