- design tokens ported verbatim from the product design, data-theme light/dark - app shell: topbar, sidebar/rail/tabbar responsive nav, lang + theme menus - ui primitives (button/card/badge/dot/chip/tabs/dialog/sheet/toast/kv/seg/progress) - api client, reconnecting ws client, zustand stores, route guard to /connect - full zh/en dictionaries (key parity test), 32 vitest specs, dist committed
44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
import path from "node:path";
|
|
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
const DAEMON = "http://127.0.0.1:7676";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(import.meta.dirname, "src"),
|
|
},
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
strictPort: false,
|
|
proxy: {
|
|
"/api": {
|
|
target: DAEMON,
|
|
changeOrigin: true,
|
|
},
|
|
"/ws": {
|
|
target: DAEMON,
|
|
changeOrigin: true,
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
preview: {
|
|
proxy: {
|
|
"/api": { target: DAEMON, changeOrigin: true },
|
|
"/ws": { target: DAEMON, changeOrigin: true, ws: true },
|
|
},
|
|
},
|
|
test: {
|
|
environment: "jsdom",
|
|
globals: true,
|
|
setupFiles: ["./tests/setup.ts"],
|
|
include: ["tests/**/*.test.{ts,tsx}"],
|
|
css: true,
|
|
restoreMocks: true,
|
|
},
|
|
});
|