Skip to content

Commit

Permalink
fix: adjust Caddy to support vite HMR
Browse files Browse the repository at this point in the history
  • Loading branch information
dyersituations committed Jun 13, 2024
1 parent c172d31 commit 12cf02b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
kiva-ui.local {
reverse_proxy localhost:8888
}

kiva-ui.local:24679 {
reverse_proxy localhost:24678
}
7 changes: 7 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
});

0 comments on commit 12cf02b

Please sign in to comment.