slidev icon indicating copy to clipboard operation
slidev copied to clipboard

Editing the first slide's heading causes a full page reload

Open IanVS opened this issue 3 years ago • 2 comments

Describe the bug I'm just getting started using slidev, and was confused at first and thinking that HMR was broken, because I was editing the first heading of the first slide, and the page was reloading. But, I realized that changing any other content uses HMR correctly.

To Reproduce Steps to reproduce the behavior:

  1. Go to sli.dev/new
  2. Wait for it to load up
  3. Change the text from Welcome to Slidev to Welcome to Slidev!, for example
  4. Note that the page refreshes, instead of HMR

Desktop (please complete the following information):

  • OS: mac / stackblitz
  • Browser: Brave
  • Slidev version: v0.30.3

IanVS avatar Apr 26 '22 01:04 IanVS

Facing the same problem but in my case the full page reload is even trigger without changing any content.

schickling avatar May 24 '22 19:05 schickling

The first frontmatter also served as inline config, which expects a full reload when some field changes. We could probably improve the experience here by diff the before/after and only triggering reloads when necessary. PR welcome.

antfu avatar May 24 '22 21:05 antfu

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.

stale[bot] avatar Sep 14 '22 16:09 stale[bot]

Based on my experience this seems to still be an issue.

schickling avatar Sep 21 '22 20:09 schickling