- migrate web UI to shared Base UI primitives (alerts, buttons, combobox, toast, etc.) - refactor chat and branch toolbars to use new components and cleaner interactions - add cross-platform file-manager fallback in `openInEditor` server handling - update model contracts/tests and web dependencies to support new UI flow
42 lines
1006 B
TypeScript
42 lines
1006 B
TypeScript
import tailwindcss from "@tailwindcss/vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vite";
|
|
|
|
const port = Number(process.env.PORT ?? 5173);
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react({
|
|
babel: {
|
|
plugins: [["babel-plugin-react-compiler", { target: "19" }]],
|
|
},
|
|
}),
|
|
tailwindcss(),
|
|
],
|
|
define: {
|
|
// In dev mode, tell the web app where the WebSocket server lives
|
|
"import.meta.env.VITE_WS_URL": JSON.stringify(process.env.VITE_WS_URL ?? ""),
|
|
},
|
|
experimental: {
|
|
enableNativePlugin: true,
|
|
},
|
|
resolve: {
|
|
tsconfigPaths: true,
|
|
},
|
|
server: {
|
|
port,
|
|
strictPort: true,
|
|
hmr: {
|
|
// Explicit config so Vite's HMR WebSocket connects reliably
|
|
// inside Electron's BrowserWindow. Vite 8 uses console.debug for
|
|
// connection logs — enable "Verbose" in DevTools to see them.
|
|
protocol: "ws",
|
|
host: "localhost",
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "dist",
|
|
emptyOutDir: true,
|
|
},
|
|
});
|