From 6b64f3561b0da8fcf48a6ccff7b08036ad858ef3 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Wed, 29 Jul 2026 18:13:17 +0530 Subject: [PATCH] fix(search): index changed files with srcDir-relative paths in dev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit indexFile expects a srcDir-relative page and joins it with srcDir, but hotUpdate passed the absolute path, producing a doubled path that failed the existence check — so edits never updated the local search index. Regression from #3374. Co-Authored-By: Claude Fable 5 --- src/node/plugins/localSearchPlugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/plugins/localSearchPlugin.ts b/src/node/plugins/localSearchPlugin.ts index 6da9eb1f..a9b053d1 100644 --- a/src/node/plugins/localSearchPlugin.ts +++ b/src/node/plugins/localSearchPlugin.ts @@ -220,7 +220,7 @@ export async function localSearchPlugin( if (this.environment.name !== 'client') return if (file.endsWith('.md')) { - await indexFile(file) + await indexFile(slash(path.relative(siteConfig.srcDir, file))) debug('🔍️ Updated', file) onIndexUpdated() }