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: dynamic routes plugin overhaul #4525

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

fix: dynamic routes plugin overhaul #4525

wants to merge 16 commits into from

Conversation

brc-dd
Copy link
Member

@brc-dd brc-dd commented Jan 27, 2025

TODO:

  • Review handleHotUpdate code across codebase. Migrate to hotUpdate if needed. Avoid running same hook twice.
    • main plugin
    • hmr fix plugin, fixes markdown snippet changes are not updating the content #4567
    • static data plugin
    • dynamic route plugin -- handle hmr for watch files (track below)
    • local search plugin -- hmr not working (track in separate pr along with other performance fixes and stable index, needs discarding docs from index on deletion/update too)
  • Do full page reload on changes in path and data loader files, and their (transitive) deps. Avoid server restart if possible. Ensure that page data is updated.
    • data loader
    • path loader
      • (transitive) deps
      • watched files -- track below
      • page data -- track below
  • Allow specifying deps for path loaders - When using "Dynamic Routes" to render raw content, how to keep hot reload working. #4569, Watch files in Path Loader #3937
    • basic implementation
    • cache invalidation and hmr
  • [Dynamic Routes]: Add transformPageData configure #2637
    • basic implementation
    • cache invalidation and hmr
  • out of sync maps in createMarkdownToVueRenderFn (c2ab5b0 didn't fix that because pages are later mapped inside that function)
  • import.meta.hot now accepts id instead of url. Fix those.
  • Maybe add e2e tests for hmr?

@brc-dd brc-dd marked this pull request as draft January 27, 2025 11:10
@brc-dd brc-dd changed the title fix: hmr not working in dynamic routes plugin fix: dynamic routes plugin overhaul Jan 27, 2025
@brc-dd brc-dd added the build Related to the build system label Jan 27, 2025
@brc-dd brc-dd self-assigned this Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to the build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

markdown snippet changes are not updating the content
1 participant