From d90dda1df5d8c106141fe3186ff056b9730b521d Mon Sep 17 00:00:00 2001 From: JIMMY_JFEXP <108483685+Kelorastus@users.noreply.github.com> Date: Tue, 29 Sep 2026 12:14:30 +0200 Subject: [PATCH] Dev: keep Vite off the workspace's target/ so tauri dev starts `npm run tauri dev` died before the window opened: Vite's watcher crashed with EBUSY on target\debug\deps\odian_launcher_lib.dll. Root cause: the Cargo workspace builds into target/ at the repo root, not under src-tauri/, and vite.config.ts only excluded src-tauri - so Vite watched the DLLs the Rust build holds locked. Spot-check: a fresh clone, `npm install`, `npm run tauri dev` opens the launcher window instead of "beforeDevCommand terminated". --- vite.config.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index eb74e77..30d1939 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,14 +2,16 @@ import { defineConfig } from "vite"; import { svelte } from "@sveltejs/vite-plugin-svelte"; // Tauri loads the dev server from a fixed port and fails if it is taken, and -// rebuilds the Rust side itself, so Vite must not watch src-tauri. +// rebuilds the Rust side itself, so Vite must not watch src-tauri - nor the +// workspace's target/ at the repo root, whose DLLs the build holds locked +// (watching one crashes Vite with EBUSY). export default defineConfig({ plugins: [svelte()], clearScreen: false, server: { port: 1420, strictPort: true, - watch: { ignored: ["**/src-tauri/**"] }, + watch: { ignored: ["**/src-tauri/**", "**/target/**"] }, }, envPrefix: ["VITE_", "TAURI_ENV_"], build: {