Files
openworker/surfaces/gui/vite.config.ts
T
Rohit C PrasadandDevika 2b45018ffa OpenWorker: initial import
Imported from andrewyng/aisuite@1b4bbf303e
(contents of its platform/ directory, hoisted to the repo root).
Development history prior to this commit lives in that repository.

Co-authored-by: Devika <devikaverma11@gmail.com>
2026-07-21 11:09:41 -07:00

17 lines
742 B
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// `base: "./"` makes built asset URLs relative, so the bundle loads from the `tauri://`
// origin in the desktop shell (absolute `/assets` 404s there); a server-hosted build is
// unaffected. Dev runs on a fixed port (1420) with strictPort so the Tauri webview always
// loads the vite instance Tauri itself spawns (a drifting port would make the window load a
// stale/other server). `tauri.conf.json` devUrl must match this.
export default defineConfig({
base: "./",
plugins: [react()],
server: { port: 1420, strictPort: true },
// Tauri CLI looks for these; harmless for the browser build.
clearScreen: false,
envPrefix: ["VITE_", "TAURI_"],
});