Introduce the @void-nav/api Hono + SQLite backend that powers the docs site: a persisted implementation board (kanban), a custom documentation-pages store with AI beautify, and an agentic orchestrator that runs `pi` agents per card. The orchestrator spawns `pi --mode rpc` inside an isolated git worktree per run, streams slim events over SSE, and lets the agent drive the board/docs via token-gated internal endpoints (all SQLite writes stay in-process). Interrupted runs are reconciled to "stopped" on boot. Workspace wiring: root `dev:api`/`dev:web` scripts with `concurrently`, the docs Vite `/api` proxy, and `.worktrees/` gitignore.
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import tailwindcss from "@tailwindcss/vite";
|
|
import { defineConfig } from "vite";
|
|
|
|
export default defineConfig({
|
|
plugins: [tailwindcss()],
|
|
// Proxy API requests to the @void-nav/api dev server (apps/api) so the docs
|
|
// site and its backend share one origin in dev — no CORS, one command to run
|
|
// both via `pnpm dev:web`.
|
|
server: {
|
|
proxy: {
|
|
"/api": "http://localhost:3001",
|
|
},
|
|
},
|
|
esbuild: {
|
|
jsx: "automatic",
|
|
jsxImportSource: "react",
|
|
},
|
|
build: {
|
|
// Generate source maps for production debugging
|
|
sourcemap: true,
|
|
// Optimize chunk splitting for better caching
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
// Bundle three.js and related libraries separately
|
|
"three-vendor": ["three", "@react-three/fiber", "@react-three/drei"],
|
|
// Bundle React separately (more stable across updates)
|
|
"react-vendor": ["react", "react-dom", "react-router-dom"],
|
|
},
|
|
},
|
|
},
|
|
// Chunk size warning limit (in kB)
|
|
chunkSizeWarningLimit: 1000,
|
|
},
|
|
// Optimize dependency pre-bundling
|
|
optimizeDeps: {
|
|
include: ["three", "@react-three/fiber", "@react-three/drei"],
|
|
},
|
|
});
|