You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd expect hot.accept(deps) to take local paths, preferably using the same node resolution algorithm (i.e. no file extension) as standard imports. Currently, you have to pass the absolute URL including extension:
// src/App.tsx
import Counter from './Counter'
import { hot } from 'vite/hmr'
if (__DEV__) {
console.log(hot)
- hot.accept('./Counter', module => {+ hot.accept('/src/Counter.tsx', module => {
console.log(module)
})
}
I'd expect hot.accept('./Counter') to do the same as hot.accept('./Counter.tsx') or at least print an error in the (browser or vite) console. Currently, it silently does nothing.
The text was updated successfully, but these errors were encountered:
I'd expect
hot.accept(deps)
to take local paths, preferably using the same node resolution algorithm (i.e. no file extension) as standard imports. Currently, you have to pass the absolute URL including extension:I'd expect
hot.accept('./Counter')
to do the same ashot.accept('./Counter.tsx')
or at least print an error in the (browser orvite
) console. Currently, it silently does nothing.The text was updated successfully, but these errors were encountered: