preactjs / preact-router

:earth_americas: URL router for Preact.
http://npm.im/preact-router
MIT License
1.01k stars 156 forks source link

Router breaks HMR with @preact/preset-vite #436

Open JacobWennebro opened 1 year ago

JacobWennebro commented 1 year ago

I have found that using this package, it seemingly breaks Vite's HMR functionality for any components rendered inside of a route component.

This is quite problematic given that we often wrap our entire applications inside of the router. I have tested it and anything outside of the router updates perfectly fine with HMR.

"vite": "^4.0.0", "@preact/preset-vite": "^2.4.0", "preact-router": "^4.1.0",