WIP push-to-talk Letta chat frontend
1import { defineConfig } from "vite";
2import { sveltekit } from "@sveltejs/kit/vite";
3import deno from "@deno/vite-plugin";
4import tailwindcss from "@tailwindcss/vite";
5
6// @ts-expect-error process is a nodejs global
7const host = Deno.env.get("TAURI_DEV_HOST");
8
9// https://vite.dev/config/
10export default defineConfig(async () => ({
11 plugins: [sveltekit(), tailwindcss(), deno()],
12
13 // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
14 //
15 // 1. prevent Vite from obscuring rust errors
16 clearScreen: false,
17 // 2. tauri expects a fixed port, fail if that port is not available
18 server: {
19 port: 1420,
20 strictPort: true,
21 host: host || false,
22 hmr: host
23 ? {
24 protocol: "ws",
25 host,
26 port: 1421,
27 }
28 : undefined,
29 watch: {
30 // 3. tell Vite to ignore watching `src-tauri` and jujutsu directory
31 ignored: ["**/src-tauri/**", "**/.jj/**"],
32 },
33 },
34}));