mirror of
https://github.com/hanzoai/status.git
synced 2026-10-30 18:21:48 +00:00
The Vite SPA crashed on mount with an uncaught "Missing theme." exception, so status.hanzo.ai rendered a blank page. Root cause: @hanzo/[email protected] is an internally inconsistent release — its GuiProvider/core are @hanzogui/[email protected] while its UI components are @hanzogui/*@3.0.x, giving two different theme React-context instances (provider sets one, components read the other → null → throw). No adjacent version is both installable and consistent (4.7.3 leaks a workspace: spec; 7.x drops getDefaultGuiConfig). @hanzo/gui was only used for 7 trivial primitives (Card, Button, Separator, Spinner, Input, Image, Select). Replace them with a tiny local src/components/ui.tsx (plain React + the existing Tailwind theme tokens in index.css) and native <select> in search-bar; remove GuiProvider from main.tsx. Drop @hanzo/gui + now-unused react-native-web (and its vite alias). Verified: headless Chromium render shows #root populated, header + search + shell paint, and no "Missing theme." error (only expected /v1/status 404s under the backend-less preview). Bundle shrinks 771KB -> 272KB.
23 lines
433 B
TypeScript
23 lines
433 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import { resolve } from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
emptyOutDir: true,
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/v1': 'http://localhost:8080',
|
|
},
|
|
},
|
|
})
|