Skip to content

Commit 18d638f

Browse files
Update tauri dev and .taurignore lookup rules (#3684)
Co-authored-by: Fabian-Lars <github@fabianlars.de>
1 parent 19b3174 commit 18d638f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/content/docs/develop/index.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,19 +235,22 @@ we must expose it in the local network. To run your app in your device you must
235235
### Reacting to Source Code Changes
236236

237237
Similarly to how your webview reflects changes in real time,
238-
Tauri watches your Rust files for changes so when you modify any of them your application is automatically rebuilt and restarted.
238+
`tauri dev` watches your `src-tauri` folder and its dependent crates in the worksapce for changes
239+
so when you modify any of them your application is automatically rebuilt and restarted.
239240

240241
You can disable this behavior by using the `--no-watch` flag on the `tauri dev` command.
241242

242-
To restrict the files that are watched for changes you can create a `.taurignore` file in the src-tauri folder.
243-
This file works just like a regular Git ignore file, so you can ignore any folder or file:
243+
To ignore watching certain files, you can create `.taurignore` files which work like regular `.gitignore` files:
244244

245245
```filename=.taurignore
246246
build/
247247
src/generated/*.rs
248248
deny.toml
249249
```
250250

251+
`.taurignore` files are usually put in the `src-tauri` directory or [cargo workspace](https://doc.rust-lang.org/cargo/reference/workspaces.html) root folder,
252+
currently, `tauri dev` looks for `.taurignore` from anywhere inside the common ancestor of watched folders and cargo workspace root folder
253+
251254
### Using the Browser DevTools
252255

253256
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.

0 commit comments

Comments
 (0)