panorama/app/vite.config.ts

22 lines
589 B
TypeScript
Raw Normal View History

2023-11-13 18:04:06 +00:00
import { defineConfig } from "vite";
2024-05-25 10:04:05 +00:00
import react from "@vitejs/plugin-react";
2023-11-13 18:04:06 +00:00
// https://vitejs.dev/config/
export default defineConfig(async () => ({
2024-05-25 10:04:05 +00:00
plugins: [react()],
2023-11-13 18:04:06 +00:00
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
//
// 1. prevent vite from obscuring rust errors
clearScreen: false,
// 2. tauri expects a fixed port, fail if that port is not available
server: {
port: 1420,
strictPort: true,
2024-05-25 10:04:05 +00:00
watch: {
// 3. tell vite to ignore watching `src-tauri`
ignored: ["**/src-tauri/**"],
},
2023-11-13 18:04:06 +00:00
},
}));