Self-hosted, federated location sharing app and server that prioritizes user privacy and security
end-to-end-encryption location-sharing privacy self-hosted federated
at main 705 B view raw
1import { defineConfig } from "vite"; 2 3// @ts-expect-error process is a nodejs global 4const host = process.env.TAURI_DEV_HOST; 5 6// https://vitejs.dev/config/ 7export default defineConfig(async () => ({ 8 // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` 9 // 10 // 1. prevent vite from obscuring rust errors 11 clearScreen: false, 12 // 2. tauri expects a fixed port, fail if that port is not available 13 server: { 14 port: 1420, 15 strictPort: true, 16 host: host || false, 17 hmr: host 18 ? { 19 protocol: "ws", 20 host, 21 port: 1421, 22 } 23 : undefined, 24 watch: { 25 // 3. tell vite to ignore watching `src-tauri` 26 ignored: ["**/src-tauri/**"], 27 }, 28 }, 29}));