mirror of
https://github.com/andrewyng/openworker.git
synced 2026-09-10 22:20:27 +00:00
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>
17 lines
742 B
TypeScript
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_"],
|
|
});
|