Files
storkit/frontend/vite.config.ts
Dave 81d4889cee Expand vite watch ignore list to prevent silent crashes on merge
Vite only needs to watch frontend/ sources. Ignore git objects,
Rust source, Cargo files, node_modules, and vendor directories
that change in bulk during squash merges.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 17:17:47 +00:00

39 lines
905 B
TypeScript

import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vite.dev/config/
export default defineConfig(() => {
const backendPort = Number(process.env.STORYKIT_PORT || "3001");
return {
plugins: [react()],
define: {
__STORYKIT_PORT__: JSON.stringify(String(backendPort)),
__BUILD_TIME__: JSON.stringify(new Date().toISOString()),
},
server: {
port: backendPort + 2172,
proxy: {
"/api": {
target: `http://127.0.0.1:${String(backendPort)}`,
timeout: 120000,
},
},
watch: {
ignored: [
"**/.story_kit/**",
"**/target/**",
"**/.git/**",
"**/server/**",
"**/Cargo.*",
"**/vendor/**",
"**/node_modules/**",
],
},
},
build: {
outDir: "dist",
emptyOutDir: true,
},
};
});