markdoc: Hot reloading breaks after one minute with the Next.js starter

What happened?

Whenever I run npm run dev and leave the page untouched in the browser and editor for about a minute, hot reloading doesn’t have an effect anymore. The Next.js reload indicator in the lower right corner still shows up but the page does not update when I change something in my sources. Refreshing the page or performing any sort of page navigation (without a full reload) fixes hot reloading until it breaks again after one minute.

To reproduce

  1. Clone the Next.js starter project and install dependencies using npm install
  2. Start npm run dev
  3. Load the page in a browser
  4. Wait for one minute
  5. Change something in a page file
  6. The Next.js reloading indicator shows up but the page is not updated

Version

0.1.4

Additional context

The exact commit of the starter repository used is cf36368f405a41499aded8b61b136c0bda44c0e3.

This problem doesn’t occur with a Next.js starter project without Markdoc, so it doesn’t seem to be a Next.js issue.

I’m also not seeing any errors or warnings in the browser console or network tab.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Can confirm it works with the latest Next.js canary + Markdoc. Thanks to everyone involved!

Thanks @ijjk! I just tested this with v12.2.6-canary.2, and that fixed the problem. Closing 👍

Sorry about this experience – @mfix-stripe let me know if you need any support from the Next.js side.