import preact from '@preact/preset-vite' import { defineConfig } from 'vite' // The build output (web/dist) is served as static files by gradio.Server at "/". // A relative base keeps asset URLs path-agnostic (works at root or under a Space root_path). // The dev proxy lets `npm run dev` hit the in-process Python API during development. export default defineConfig({ base: './', plugins: [preact()], server: { proxy: { '/api': 'http://127.0.0.1:7860', '/healthz': 'http://127.0.0.1:7860', }, }, })