Files
storkit/frontend/vite.config.ts

27 lines
599 B
TypeScript
Raw Normal View History

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)),
},
server: {
port: backendPort + 2172,
proxy: {
"/api": {
target: `http://127.0.0.1:${String(backendPort)}`,
timeout: 120000,
},
},
2026-02-16 18:57:39 +00:00
},
build: {
outDir: "dist",
emptyOutDir: true,
},
};
});