I am experiencing an issue with the usage of Hot Reload in Vite Server when using the latest version of IntelliJ IDEA.
The version of Vite is 4.3.8. The version of IntelliJ IDEA is Build #IU-231.8109.175, built on March 28, 2023. The operating system is macOS 13.0 (22A380) Apple Silicon M1.
Specifically, the following is happening: I launch the project with turborepo: yarn dev
inside an IntelliJ IDEA Terminal (I have also tried running yarn dev
from a macOS terminal, and the behavior is the same). When I modify a file in the turborepo/packages/server
folder, the change is detected by Vite, and hot reloading is triggered immediately. However, when I modify a file in turborepo/packages/frontend
, the change is no longer detected, and the frontend does not update.
As a test, I closed IntelliJ IDEA and modified a file in server
and another in frontend
using a regular text editor (such as Sublime Text), and in that case, hot reloading worked for both the server and the frontend.
I did not encounter this problem before updating IntelliJ IDEA; I was using the 2022 version without any issues.
It seems that the issue lies in the file saving phase in the frontend by IntelliJ IDEA, a save action that evidently is not detected by Vite. I'm not sure if Vite internally uses Chokidar or fsevents, but I can confirm that this problem did not exist with the 2022 version of the IDE.
This issue is quite puzzling, and I am unsure how to troubleshoot it. Has anyone experienced a similar problem? Is there a possible solution?