Commit Graph

1 Commits

Author SHA1 Message Date
Yunfei He 2b61f3fd29 perf(metadata): cache scanMetadataFiles to skip the redundant 2nd per-build app-tree walk (#2394)
* perf(metadata): cache the per-build app metadata-file scan

* fix(metadata): invalidate cache on opengraph/twitter alt-text sidecars

scanMetadataFiles folds `*.alt.txt` sidecars into a static social image
route's altFilePath via an existsSync probe, but isMetadataRouteFile did
not treat them as route files. With the new per-appDir scan cache, adding
or removing an alt sidecar in dev no longer triggered invalidation, so
the cached scan kept a stale altFilePath. Match the sidecars in the dev
invalidation predicate so the metadata cache clears and re-scans.

---------

Co-authored-by: James Anderson <james@eli.cx>
2026-06-28 19:30:38 +00:00