New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next.js HMR sometimes not working #63
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I was able to confirm that this is indeed a bug in Next.js (thanks @sokra for your help!). The problem is that Next.js seems to only listen to changes for ~30 seconds after the last change and then automatically "unsubscribes". This might change with the introduction of React Server Components. |
Hey! is there any fix in this case!? |
Unfortunately I'm not aware of any workaround / solution to this problem but I'm in touch with the Next.js team about it. I've also just filed a bug report for it: vercel/next.js#34054 |
Alright no worries. Thanks a lot for creating this lib <3 |
Seems like this can be configured like here: https://nextjs.org/docs/api-reference/next.config.js/configuring-onDemandEntries Will look into how to make this the default behaviour for Contentlayer out of the box soon. |
This should be addressed with However, ideally the workaround implemented with |
I've noticed that in some situations Next.js' HMR stops working after some time. I suspect this rather to be a problem in Next.js than in Contentlayer but I'm not certain yet since I can't yet reliably reproduce the problem.
If someone else faces the same problem, please share your situation below in the comments. 🙏
The text was updated successfully, but these errors were encountered: