gestalt
gestalt copied to clipboard
Markdown pages: Auto-reload doesn't work
Platform: web
Steps to reproduce:
- Pull the latest Gestalt code
- Run
yarn start
- Go to http://localhost:8888/get_started/developers/development_process
- 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
Most likely root cause is that we're using a dynamic page route: docs/pages/[...id].js
for the markdown pages
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.