Skip to content

perf: move PieChart to docs-specific components#17153

Merged
wackerow merged 1 commit into
devfrom
perf/move-piechart-to-docs-components
Jan 23, 2026
Merged

perf: move PieChart to docs-specific components#17153
wackerow merged 1 commit into
devfrom
perf/move-piechart-to-docs-components

Conversation

@minimalsm
Copy link
Copy Markdown
Contributor

Summary

Move PieChart from base MdComponents to docs-specific components to reduce bundle size for most pages.

Problem

  • PieChart imports Recharts (~75KB parsed)
  • Was bundled for ALL 6,500+ MDX pages via the base MdComponents
  • Only actually used on 2 pages (both in /developers/docs/ using the docs layout)

Solution

  • Remove PieChart from src/components/MdComponents/index.tsx (base components)
  • Add PieChart to src/layouts/Docs.tsx (docs-specific components)

Impact

  • Non-docs pages no longer bundle Recharts
  • Pages using the docs layout still have access to PieChart
  • No functionality change for end users

Closes #17152

Move PieChart from base MdComponents to docsComponents to reduce
bundle size. PieChart (which imports Recharts ~75KB) was being
bundled for all 6,500+ MDX pages even though it's only used on 2
docs pages.

Now PieChart is only bundled for pages using the docs layout.

Closes #17152
@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 23, 2026

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit db88b84
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/697313b4d080cf0008ad0222
😎 Deploy Preview https://deploy-preview-17153.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 59 (🟢 up 6 from production)
Accessibility: 94 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@wackerow wackerow merged commit f2accb9 into dev Jan 23, 2026
7 checks passed
@wackerow wackerow deleted the perf/move-piechart-to-docs-components branch January 23, 2026 12:36
@wackerow wackerow mentioned this pull request Jan 23, 2026
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.

perf: move PieChart to docs-specific components to reduce bundle size

2 participants