Files
storkit/frontend/vite.config.ts
Dave e54209eb5a Story 32: Multi-Instance Worktree Support
Add configurable port via STORYKIT_PORT env var (default 3001). Server
prints machine-readable STORYKIT_PORT=<port> on startup and writes
.story_kit_port file for discovery. Frontend proxy and WebSocket read
VITE_STORYKIT_PORT env var instead of hardcoding port 3001.

7 new tests (4 backend, 3 frontend) all passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 17:14:33 +00:00

24 lines
491 B
TypeScript

import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vite.dev/config/
export default defineConfig(() => {
const backendPort = process.env.VITE_STORYKIT_PORT || "3001";
return {
plugins: [react()],
server: {
port: 5173,
proxy: {
"/api": {
target: `http://127.0.0.1:${backendPort}`,
timeout: 120000,
},
},
},
build: {
outDir: "dist",
emptyOutDir: true,
},
};
});