Skip to content
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

fix: code snippets HMR #1789

Merged
merged 1 commit into from
Jul 28, 2024
Merged

fix: code snippets HMR #1789

merged 1 commit into from
Jul 28, 2024

Conversation

KermanX
Copy link
Member

@KermanX KermanX commented Jul 28, 2024

fix HMR for code snippets (<<< path/to/snippet.ts)

Redesigned data.watchFiles:

Previously, it was an array for all watched files that should trigger Slidev's handleHotUpdate. In handleHotUpdate, Slidev first loads the slides and compares each slide to know which slide should be updated. However, code snippets are loaded in transform hook. The new data.watchFiles is an object mapping from the watched file path to slide indexes that must be updated when the file is changed.

Copy link

netlify bot commented Jul 28, 2024

Deploy Preview for slidev ready!

Name Link
🔨 Latest commit 6a4c301
🔍 Latest deploy log https://app.netlify.com/sites/slidev/deploys/66a5b91f2dc4820008d2d90f
😎 Deploy Preview https://deploy-preview-1789--slidev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants