Skip to content

[feat] Exclude files/folders from dev watching #4406

@fehnomenal

Description

@fehnomenal

Describe the problem

If writing to the project folder during dev by guarding with if cfg!(debug_assertions) { the dev watcher triggers and restarts the whole app which in turn writes a file and the cycle repeats.

Specifically I use the graphql plugin and write the schema to disc for other tooling. I do not wish to ignore the file to track schema evolution.

Describe the solution you'd like

I think the most flexible approach would be to add an ignore file to the watcher from an environment variable like TAURI_DEV_IGNORE_FILE.

Alternatives considered

Git-ignoring the file is out of the question for me.

Additional context

I will try to come up with a PR because I need this very soon.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions