Files
blog-nextjs/app/pagefind/[...path]
gbanyan a7aa930759 Fix search hanging on production by correcting Pagefind file path
Problem: Search modal hangs on loading in production deployment,
but works fine locally.

Root cause: The Pagefind route handler was reading files from
.next/pagefind, which is not reliably accessible in production
deployments. The build script copies Pagefind files to
public/_pagefind for deployment, but the route wasn't using them.

Solution: Changed the file path in app/pagefind/[...path]/route.ts
from .next/pagefind to public/_pagefind. Files in the public
directory are always accessible and properly deployed.

This ensures search works consistently across both development
and production environments.
2025-11-20 16:27:34 +08:00
..