Skip to content

fix(dev-cache): hot reload for documentDriven: false#2686

Merged
farnabaz merged 1 commit intonuxt:mainfrom
coffeephile:fix/localhost-hot-reload
Jul 5, 2024
Merged

fix(dev-cache): hot reload for documentDriven: false#2686
farnabaz merged 1 commit intonuxt:mainfrom
coffeephile:fix/localhost-hot-reload

Conversation

@coffeephile
Copy link
Copy Markdown
Contributor

🔗 Linked issue

#2674

Previous PR: #2675

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Fixing a bug introduced by my previous PR

perf(dev-cache): improve localhost markdown page navigation performance (when having 2,000+ pages) #2675

(sorry about that 💦)

By loading the refresh-cache.ts plugin only for options.documentDriven enabled, hot reload on dev server does not work when documentDriven is disabled.

Reproduction

The bug can be reproduced via
https://github.com/coffeephile/nuxt-huge-project-test/tree/nuxt-content-performance-patch?tab=readme-ov-file#run-with-performance-patch

  • when applying ./patch-content-localhost-old.sh the code of the current content -> main branch gets applied and hot reload does not work.
  • when applying ./patch-content-localhost.sh the new code of this PR gets applied and hot reload is fixed, even when documentDriven is disabled.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link
Copy Markdown
Member

@farnabaz farnabaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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