mirror of
https://github.com/run-llama/template-workflow-showcase.git
synced 2026-07-01 21:34:16 -04:00
Configure Vite HMR client port via environment variable (#201)
* feat: add LLAMA_DEPLOY_SERVER_PORT HMR clientPort to template vite configs Set hmr.clientPort to LLAMA_DEPLOY_SERVER_PORT when defined, enabling Vite HMR websocket connections to work through the server proxy. https://claude.ai/code/session_01Hq5ZQxquwtyJVJ2qw48bbt * feat: add LLAMA_DEPLOY_SERVER_PORT HMR support to template vite configs Add hmr.port and hmr.clientPort to all template vite configs so that Vite HMR websocket connections work through the server proxy. When LLAMA_DEPLOY_SERVER_PORT is set, clientPort directs the browser's HMR websocket to connect via the proxy server port. Bump patch versions for all affected templates. https://claude.ai/code/session_01Hq5ZQxquwtyJVJ2qw48bbt --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ export default defineConfig(({}) => {
|
||||
const basePath = process.env.LLAMA_DEPLOY_DEPLOYMENT_BASE_PATH;
|
||||
const projectId = process.env.LLAMA_DEPLOY_PROJECT_ID;
|
||||
const port = process.env.PORT;
|
||||
const serverPort = process.env.LLAMA_DEPLOY_SERVER_PORT;
|
||||
return {
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
@@ -20,6 +21,7 @@ export default defineConfig(({}) => {
|
||||
host: true,
|
||||
hmr: {
|
||||
port: port ? parseInt(port) : undefined,
|
||||
clientPort: serverPort ? parseInt(serverPort) : undefined,
|
||||
},
|
||||
},
|
||||
build: {
|
||||
|
||||
Reference in New Issue
Block a user