chisel/vite.config.ts
maverick 974e26f592 Chisel v0 — AI CAD single-shot generator
Chat → Claude writes a JSCAD script → sandboxed Web Worker executes it →
live three.js preview + STL export. Parametric // @param comments become
live sliders. Server-side repair loop fixes geometry errors before the user
sees them.

- src/worker: Hono API, Claude orchestration (prompt-cached system prompt),
  /api/generate + /api/repair
- src/client: React + react-three-fiber viewport, JSCAD engine Web Worker
- Radical-branded (red #FF2D55 on #0B0B09, Syne + IBM Plex Mono)

Engine validated end-to-end: mug model → 3256-triangle valid binary STL.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-25 00:03:38 +10:00

19 lines
528 B
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// Client builds into ./public, which the Worker serves via the ASSETS binding.
// /api/* is handled by the Worker (see src/worker/index.ts); everything else is
// the SPA. In dev, `vite` proxies /api to `wrangler dev` on :8787.
export default defineConfig({
root: "src/client",
publicDir: false,
build: {
outDir: "../../public",
emptyOutDir: true,
},
server: {
proxy: {
"/api": "http://localhost:8787",
},
},
});