Skip to content

perf: lazy-load Map and DetailHeritageMap to shrink initial JS bundle [closes #331]#371

Closed
zigzagdev wants to merge 4 commits into
perf/skeleton-loadingfrom
perf/lazy-load-map
Closed

perf: lazy-load Map and DetailHeritageMap to shrink initial JS bundle [closes #331]#371
zigzagdev wants to merge 4 commits into
perf/skeleton-loadingfrom
perf/lazy-load-map

Conversation

@zigzagdev
Copy link
Copy Markdown
Owner

Summary

  • TopPage: Map converted to React.lazy() with <Suspense> fallback (pulse placeholder)
  • HeritageDetailLayout: DetailHeritageMap converted to React.lazy() with <Suspense> fallback
  • Leaflet JS will now be split into a separate chunk, not bundled into the initial load

Test plan

  • npm run build produces a separate chunk for the map component
  • Map on top page renders correctly after lazy load
  • Map on detail page (mobile) renders correctly after lazy load
  • Pulse placeholder visible while map chunk loads
  • TypeScript compiles without errors

🤖 Generated with Claude Code

@zigzagdev zigzagdev force-pushed the perf/skeleton-loading branch from 7c1f3fa to a705378 Compare May 21, 2026 23:54
zigzagdev and others added 2 commits May 22, 2026 08:55
… fallback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e pulse fallback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@zigzagdev zigzagdev force-pushed the perf/lazy-load-map branch from 9e8e78b to 85a27b0 Compare May 21, 2026 23:55
zigzagdev and others added 2 commits May 22, 2026 09:29
… on UNESCO image URLs

fetchPriority="high" and loading="eager" triggered rate-limiting on UNESCO's
document server. Revert to loading="lazy" for all images. Keep width, height,
and decoding="async" for CLS prevention.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drop decoding="async", width/height hints — image optimization issue
is being closed without implementation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@zigzagdev zigzagdev deleted the branch perf/skeleton-loading May 22, 2026 00:37
@zigzagdev zigzagdev closed this May 22, 2026
@zigzagdev zigzagdev deleted the perf/lazy-load-map branch May 22, 2026 00:38
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.

1 participant