I have noticed an issue with the HMR feature in the following configuration.
We have a full page reload instead of a hot reload when working on the root / route.
Still, It's working find for the /signin route or when renaming pro/index into pro/homepage.
pages/
โโโ _document.js
โโโ _error.js
โโโ admin
โย ย โโโ index.js
โย ย โโโ signin.js
โโโ pro
ย ย โโโ index.js
ย ย โโโ signin.js
import nextRoutes from 'next-routes'
const routes = nextRoutes()
routes.add('pro/index', '/')
routes.add('pro/signin', '/signin')
export const Router = routes.Router
export const Link = routes.Link
export default routes
P.S: regarding why nesting the pages, the answer is subdomain handing.
Could you send me a sample repo and clearly describe the error a bit more?
Given how simple the fix is, I'm not sure I want to spend more time on that issue. I have raised it at it may sounds something trivial to fix for someone knowing the code base. Still, I could submit a new examples PR to show how people can handle subdomains with next if that something that match the vision of the project :).
@fridays I'm not sure if it's related to next-routes. But do you have any idea? ๐
I can't reproduce, maybe it's related to the subdomain setup? A sample would be great.
Yeah, will work on a reproduction as this setup seems to no longer work with the v3-beta. I need to sort that out.
Most helpful comment
Given how simple the fix is, I'm not sure I want to spend more time on that issue. I have raised it at it may sounds something trivial to fix for someone knowing the code base. Still, I could submit a new examples PR to show how people can handle subdomains with next if that something that match the vision of the project :).