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