aboutsummaryrefslogtreecommitdiff
path: root/desktop/vite.config.ts
diff options
context:
space:
mode:
authorRanXom <saiyedshizain@gmail.com>2026-06-13 20:20:34 +0530
committerRanXom <saiyedshizain@gmail.com>2026-06-13 20:20:34 +0530
commitf198550ea7ea25c527e92ae5c6c221b3b1deb413 (patch)
tree5001b2802fb6d85214868cd9bd1ef1e3ebf5428a /desktop/vite.config.ts
parent0606f56dc242aa68213858ee299940add5e40d52 (diff)
downloadpomoru-f198550ea7ea25c527e92ae5c6c221b3b1deb413.tar.xz
pomoru-f198550ea7ea25c527e92ae5c6c221b3b1deb413.zip
add icon and logo for the gui app
Diffstat (limited to 'desktop/vite.config.ts')
-rw-r--r--desktop/vite.config.ts32
1 files changed, 32 insertions, 0 deletions
diff --git a/desktop/vite.config.ts b/desktop/vite.config.ts
new file mode 100644
index 0000000..ddad22a
--- /dev/null
+++ b/desktop/vite.config.ts
@@ -0,0 +1,32 @@
+import { defineConfig } from "vite";
+import react from "@vitejs/plugin-react";
+
+// @ts-expect-error process is a nodejs global
+const host = process.env.TAURI_DEV_HOST;
+
+// https://vite.dev/config/
+export default defineConfig(async () => ({
+ plugins: [react()],
+
+ // 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,
+ host: host || false,
+ hmr: host
+ ? {
+ protocol: "ws",
+ host,
+ port: 1421,
+ }
+ : undefined,
+ watch: {
+ // 3. tell Vite to ignore watching `src-tauri`
+ ignored: ["**/src-tauri/**"],
+ },
+ },
+}));