2023-12-02 22:24:36 +00:00
|
|
|
import { defineConfig } from "vite";
|
|
|
|
|
import react from "@vitejs/plugin-react";
|
2023-12-14 10:37:29 +00:00
|
|
|
import svgr from "vite-plugin-svgr";
|
2023-12-02 22:24:36 +00:00
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
|
export default defineConfig(async () => ({
|
2023-12-14 10:37:29 +00:00
|
|
|
plugins: [react(), svgr()],
|
2023-12-02 22:24:36 +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,
|
2023-12-14 10:37:29 +00:00
|
|
|
},
|
2023-12-02 22:24:36 +00:00
|
|
|
}));
|