Files
huskies/frontend/vite.config.ts
T

39 lines
905 B
TypeScript
Raw Normal View History

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