Skip to content

Perf/lighthouse check/products#44

Open
bittensorrider wants to merge 3 commits into
aglover1221:mainfrom
bittensorrider:perf/lighthouse-check/products
Open

Perf/lighthouse check/products#44
bittensorrider wants to merge 3 commits into
aglover1221:mainfrom
bittensorrider:perf/lighthouse-check/products

Conversation

@bittensorrider
Copy link
Copy Markdown

Summary

Performance improvements for /products/[slug] based on Lighthouse audits:

  • bfcache — Replaced force-dynamic with ISR (revalidate = 60, generateStaticParams); annotation mutations call revalidatePath
  • Render-blocking CSS — Inline Tailwind at build time via scripts/generate-inline-styles.mjs; moved schema-only .md-preview styles to a separate file
  • Legacy JavaScript — Stubbed Next.js polyfill module for modern browsers; added explicit browserslist targets
  • Unused JavaScript — Server-rendered NavBar (pathname via middleware); lazy-load annotation popover on click; dynamic ReExtractButton on product pages

Test plan

  • npm run build && npm start
  • Lighthouse on /products/r770 in Incognito (extensions off)
  • Confirm bfcache, render-blocking CSS, and legacy JS insights are resolved
  • Verify annotation buttons and Re-extract still work after interaction
  • Verify NavBar active state on navigation

Screenshots

Before Fix

image-3b0728e8-0fce-47ed-9ffa-40b32db31c52

After Fix

image-0f86ce66-c927-4379-a450-a83a4e87400e

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