From 39d4eb0bee8f62f0388e28d36ccf04665a8684d6 Mon Sep 17 00:00:00 2001 From: Tony Date: Tue, 20 Jan 2026 21:52:52 +0800 Subject: [PATCH] Update `tauri dev` and `.taurignore` lookup rules --- src/content/docs/develop/index.mdx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/content/docs/develop/index.mdx b/src/content/docs/develop/index.mdx index 1715f9b1c..146d831e0 100644 --- a/src/content/docs/develop/index.mdx +++ b/src/content/docs/develop/index.mdx @@ -235,12 +235,12 @@ we must expose it in the local network. To run your app in your device you must ### Reacting to Source Code Changes Similarly to how your webview reflects changes in real time, -Tauri watches your Rust files for changes so when you modify any of them your application is automatically rebuilt and restarted. +`tauri dev` watches your `src-tauri` folder and its dependent crates in the worksapce for changes +so when you modify any of them your application is automatically rebuilt and restarted. You can disable this behavior by using the `--no-watch` flag on the `tauri dev` command. -To restrict the files that are watched for changes you can create a `.taurignore` file in the src-tauri folder. -This file works just like a regular Git ignore file, so you can ignore any folder or file: +To ignore watching certain files, you can create `.taurignore` files which work like regular `.gitignore` files: ```filename=.taurignore build/ @@ -248,6 +248,9 @@ src/generated/*.rs deny.toml ``` +`.taurignore` files are usually put in the `src-tauri` directory or [cargo worksapce](https://doc.rust-lang.org/cargo/reference/workspaces.html) root folder, +currently, `tauri dev` looks for `.taurignore` from anywhere inside the common ancestor of watched folders and cargo worksapce root folder + ### Using the Browser DevTools Tauri's APIs only work in your app window, so once you start using them you won't be able to open your frontend in your system's browser anymore.