#Vite plugins sometimes need to run expensive tasks. By controlling when your plugin runs these tasks, you can make both the #Dev server and production builds faster. Here's a quick solution:
What's your best tip for developing Vite plugins?
https://samuelplumppu.se/blog/detect-vite-plugin-restarts-to-avoid-rerunning-expensive-tasks