gestalt icon indicating copy to clipboard operation
gestalt copied to clipboard

Markdown pages: Auto-reload doesn't work

Open christianvuerings opened this issue 2 years ago • 2 comments

Platform: web

Steps to reproduce:

  1. Pull the latest Gestalt code
  2. Run yarn start
  3. Go to http://localhost:8888/get_started/developers/development_process
  4. Make a change to docs/markdown/get_started/developers/development_process.md

Expected Result: The page updates with the new text Actual Result: The page doesn't update - we need to do a manual reload

Caused by #2227

christianvuerings avatar Aug 20 '22 07:08 christianvuerings

Most likely root cause is that we're using a dynamic page route: docs/pages/[...id].js for the markdown pages

christianvuerings avatar Aug 20 '22 07:08 christianvuerings

Yes, I can repro. I think it seems to be a known issue with using Markdown files. https://github.com/vercel/next.js/discussions/11419

Fast refresh also only works in the React Component Tree as mentioned here: https://github.com/vercel/next.js/discussions/15581

We can introduce a new package like next-remote-watch to fix this problem.

I don't feel too great about introducing a new package at the moment. Since we can also preview markdown files locally with cmd+shift+v, and it hasn't been too much of a showstopper.

rlingineni avatar Aug 22 '22 15:08 rlingineni