Major performance optimizations addressing PageSpeed Insights warnings:
**Phase 1: Replace Framer Motion with CSS (~60-100KB savings)**
- Remove Framer Motion from components/post-layout.tsx
- Add CSS transitions to styles/globals.css for TOC animations
- Replace motion.div/motion.button with regular elements + CSS classes
- Remove framer-motion package dependency
**Phase 2: Replace FontAwesome with React Icons (~150-250KB savings)**
- Replace FontAwesome in 16 components with react-icons
- Use Feather icons (react-icons/fi) for UI elements
- Use FontAwesome brand icons (react-icons/fa) for social media
- Remove 4 @fortawesome packages (@fortawesome/fontawesome-svg-core,
@fortawesome/free-brands-svg-icons, @fortawesome/free-solid-svg-icons,
@fortawesome/react-fontawesome)
- Updated components:
- app/error.tsx, app/tags/page.tsx, app/tags/[tag]/page.tsx
- components/hero.tsx, components/mastodon-feed.tsx
- components/meta-item.tsx, components/nav-menu.tsx
- components/post-card.tsx, components/post-layout.tsx
- components/post-list-item.tsx, components/post-list-with-controls.tsx
- components/post-storyline-nav.tsx, components/post-toc.tsx
- components/right-sidebar.tsx, components/search-modal.tsx
- components/site-footer.tsx, components/theme-toggle.tsx
**Phase 3: Convert Mastodon Feed to Server Component**
- Convert components/mastodon-feed.tsx from Client Component to async Server Component
- Replace client-side useEffect fetching with server-side ISR
- Add 30-minute revalidation (next: { revalidate: 1800 })
- Eliminate 2 blocking client-side network requests
- Remove loading state (rendered on server)
**Total Impact:**
- JavaScript bundle: ~210-350KB reduction
- Blocking network requests: 2 eliminated
- Main thread time: Reduced by ~100-160ms
- Build: ✅ Verified successful
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
55 lines
1.6 KiB
JSON
55 lines
1.6 KiB
JSON
{
|
|
"name": "personal-home",
|
|
"version": "1.0.0",
|
|
"description": "",
|
|
"main": "index.js",
|
|
"scripts": {
|
|
"dev": "concurrently \"contentlayer2 dev\" \"next dev --turbo\"",
|
|
"sync-assets": "node scripts/sync-assets.mjs",
|
|
"build": "npm run sync-assets && contentlayer2 build && next build && npx pagefind --site .next && rm -rf public/_pagefind && cp -r .next/pagefind public/_pagefind",
|
|
"start": "next start",
|
|
"lint": "next lint",
|
|
"contentlayer": "contentlayer build"
|
|
},
|
|
"keywords": [],
|
|
"author": "",
|
|
"license": "ISC",
|
|
"type": "module",
|
|
"dependencies": {
|
|
"@emotion/is-prop-valid": "^1.4.0",
|
|
"@vercel/og": "^0.8.5",
|
|
"clsx": "^2.1.1",
|
|
"contentlayer2": "^0.5.8",
|
|
"gray-matter": "^4.0.3",
|
|
"markdown-wasm": "^1.2.0",
|
|
"next": "^16.0.3",
|
|
"next-contentlayer2": "^0.5.8",
|
|
"next-themes": "^0.4.6",
|
|
"react": "^19.2.0",
|
|
"react-dom": "^19.2.0",
|
|
"react-icons": "^5.5.0",
|
|
"rehype-autolink-headings": "^7.1.0",
|
|
"rehype-pretty-code": "^0.14.1",
|
|
"rehype-slug": "^6.0.0",
|
|
"remark-directive": "^4.0.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"shiki": "^3.15.0",
|
|
"tailwind-merge": "^3.4.0",
|
|
"unist-util-visit": "^5.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/typography": "^0.5.19",
|
|
"@types/node": "^24.10.1",
|
|
"@types/react": "^19.2.5",
|
|
"@types/react-dom": "^19.2.3",
|
|
"autoprefixer": "^10.4.22",
|
|
"concurrently": "^9.2.1",
|
|
"eslint": "^9.39.1",
|
|
"eslint-config-next": "^16.0.3",
|
|
"pagefind": "^1.4.0",
|
|
"postcss": "^8.5.6",
|
|
"tailwindcss": "^3.4.18",
|
|
"typescript": "^5.9.3"
|
|
}
|
|
}
|