Closed pawelzwronek closed 1 year ago
Interesting, probably related to reusing the same watcher than Vite is using.
Normally, you wouldn't need to force a reload for any file that is imported (such as .ts
files), as Vite would already reload the page on changes.
Can you share your use case?
Normally Vite is hot reloading only one file I changed. In normal/properly written app I think this is expected behaviour but in my app this lead to many memory leaks on older version of the file, which Vite is not removing. Also old code was sometimes still running and conflicting with the new version of the file. So for me best option is to reload whole page to have fresh start.
Closing for now, as watching files that have HMR support is out of scope for this plugin.
Great plugin thx! One issue made me move to
vite-plugin-live-reload
. When I set path to watch for only some extensons like'src/**/*.ts'
then altering other files, prevent Vite from hot reload that other files. I was testing this with.sccs
files.