Skip to content

Add Option to control when Plugin triggers Restart (on add & delete not on Change) #25

@Kingju777

Description

@Kingju777

Clear and concise description of the problem

I wish to restart the server only when a file is added or deleted not, when someone makes a change in the file.
When a file is added or deleted i need to do some Housekeeping to make my Application work.
And to trigger that i need to restart the Server.

restarting the server on change is just distracting for me, because it takes to long and repaints the screen a second timer

Suggested solution

please Add an additional Option that globally controls what is watched

updateOn?: "all"|"AddDelete"

more generally

updateOn?: {
    add:boolean,
    change:boolean,
    delete:boolean,// Vite calls this "unlink" and not delete
}




if you want i can implement the Change in your preferred way and open a PR.

Alternative

i can completely understand if this request is out of scope for this projekt.

Additional context

thank you very much for creating and maintaining this awesome Plugin.

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions