sdlc-hub/web/vite.config.ts
Andrey Epifancev bb3ddd1770 fix: волна по финальному ревью — I-2 fromFile при обновлении из файла, тесты, комментарии, спека (#29)
I-2, M-4..M-8, M-11, M-13, M-16, M-18, T7.3, M-1..M-3, M-17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 02:40:33 +04:00

21 lines
938 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import react from "@vitejs/plugin-react";
import { defineConfig } from "vitest/config";
// сервер разработки: приложение под /app/, маршруты API — прокси на хаб (по умолчанию тестовый :8791, R-5)
const hub = process.env.JIRA_HUB_URL ?? "http://127.0.0.1:8791"; // порт держать равным HUB_PORT в playwright.config.ts
const API = ["/board", "/issues", "/settings", "/agent", "/refresh", "/batches", "/commands", "/sync-runs"];
export default defineConfig({
base: "/app/",
plugins: [react()],
build: { outDir: "../src/jira_hub/web/app", emptyOutDir: true },
server: { host: "127.0.0.1", port: 5173, proxy: Object.fromEntries(API.map((p) => [p, { target: hub }])) },
test: {
environment: "jsdom",
setupFiles: ["./src/test/setup.ts"],
include: ["src/**/*.test.{ts,tsx}"],
restoreMocks: true,
unstubGlobals: true,
},
});