Fixes #22 (the comment, not the thread, since the thread is long fixed).
At some point between Vite 3 and Vite 5, Vite changed their way of checking whether a module should receive the HMR context or not. Previously, they required having the import.meta.hot.accept() call to notify the import analysis that module is going to self-accept.
Currently, they only check for the import.meta.hot expression, but that broke the HMR for Vite such that it's merging import.meta.hot.accept calls, leading to conflicts like declining HMR updates.
The fix here is to remove the unnecessary import.meta.hot.accept call.
Fixes #22 (the comment, not the thread, since the thread is long fixed).
At some point between Vite 3 and Vite 5, Vite changed their way of checking whether a module should receive the HMR context or not. Previously, they required having the
import.meta.hot.accept()
call to notify the import analysis that module is going to self-accept.Currently, they only check for the
import.meta.hot
expression, but that broke the HMR for Vite such that it's mergingimport.meta.hot.accept
calls, leading to conflicts like declining HMR updates.The fix here is to remove the unnecessary
import.meta.hot.accept
call.