fix: eliminate 4.3 MB Phosphor icon client chunk - #32575
Open
mvvmm wants to merge 1 commit into
Open
Conversation
PhosphorIcon imported @iconify-json/ph/icons.json (27,693-line JSON containing every Phosphor icon) at runtime, producing a 4.3 MB client chunk. Replace with six ?raw SVG imports from @phosphor-icons/core for the only icons actually used: thumbs-up, thumbs-down, check-circle, magnifying-glass, x, check-bold. Before: 4.3 MB PhosphorIcon chunk + 647 KB chunk = 2 chunks > 500 KB After: 647 KB chunk only (mermaid/cytoscape, separate issue) Build time: 3m 27s → 2m 48s
Contributor
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
Contributor
|
Preview URL: https://aaf83379.preview.developers.cloudflare.com |
Contributor
Review
👉 Fix in your agent 👈Fix the following review findings in PR #32575 (https://github.com/cloudflare/cloudflare-docs/pull/32575).
Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order
After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.
The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.
---
## Conventions
### Warnings (1)
#### CV-0bdfca191198 · Product or area identified
- **File:** PR-level finding
- **Issue:** The title "fix: eliminate 4.3 MB Phosphor icon client chunk" does not name the product, feature, or documentation area affected.
- **Fix:** Prefix the title with a product tag or area, e.g. "[Components] fix: eliminate 4.3 MB Phosphor icon client chunk" or "frontend: fix: eliminate 4.3 MB Phosphor icon client chunk".
Code ReviewThis code review is in beta and may not always be helpful — use your judgment. No code review issues found. ConventionsWarnings (1)
Style Guide ReviewNo style-guide issues found. CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
ahaywood
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the full
@iconify-json/ph/icons.jsonimport inPhosphorIcon.tsx(27,693-line JSON containing every Phosphor icon) with six?rawSVG imports from@phosphor-icons/corefor the only icons actually used by React islands:thumbs-up,thumbs-down,check-circle,magnifying-glass,x,check-bold.The full-set import produced a 4.3 MB client-side JS chunk (
PhosphorIcon.cbrmX4Sq.js) that shipped to every page with a feedback widget or resource selector. The replacement inlines ~2 KB of SVG markup total, eliminating the chunk entirely.The
nameprop is now a union type (keyof typeof icons) instead ofstring, providing compile-time safety for unknown icon names rather than a runtime throw.