Files
wiggleverse-ecomm/frontend/vite.config.ts
ben.stull b3ffb2d4b6 feat(slice-2): Landing + Sign-in screens, entry routing, API client (§5.1/5.2/6.5)
Two-step email + one-time-code sign-in behind both doors; pure entry-routing rule unit-
tested with Vitest (§6.8); storefront routing reaches a SLICE-2 signed-in placeholder with
sign-out (PUC-9). check.sh now runs the frontend unit tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 10:39:48 -07:00

25 lines
820 B
TypeScript

/// <reference types="vitest/config" />
import react from "@vitejs/plugin-react";
import { defineConfig } from "vitest/config";
// The SPA talks to the FastAPI backend on :8000 via a same-origin proxy, so the
// browser makes no cross-origin calls in dev. Override the target with
// VITE_API_TARGET when :8000 is occupied. Screen-shaped /api/* endpoints arrive in
// SLICE-2/3 (SD-0001 §6.4).
const apiTarget = process.env.VITE_API_TARGET || "http://localhost:8000";
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
proxy: {
"/api": apiTarget,
},
},
// Tests live alongside source; scoping the include to src/ keeps the runner out of
// node_modules (and any stray local backup dirs) without naming them.
test: {
include: ["src/**/*.test.{ts,tsx}"],
},
});