René's URL Explorer Experiment


Title: fix: stop shipping duplicate JS chunks on published pages · Issue #548 · ycode/ycode · GitHub

Open Graph Title: fix: stop shipping duplicate JS chunks on published pages · Issue #548 · ycode/ycode

X Title: fix: stop shipping duplicate JS chunks on published pages · Issue #548 · ycode/ycode

Description: Summary Published sites currently download two ~499 KB (≈148 KiB gzip) JavaScript chunks with substantially overlapping modules. On the client website those files are: /_next/static/chunks/d6c471d59bccc477.js — 487 KiB raw / ≈141 KiB gzi...

Open Graph Description: Summary Published sites currently download two ~499 KB (≈148 KiB gzip) JavaScript chunks with substantially overlapping modules. On the client website those files are: /_next/static/chunks/d6c471d5...

X Description: Summary Published sites currently download two ~499 KB (≈148 KiB gzip) JavaScript chunks with substantially overlapping modules. On the client website those files are: /_next/static/chunks/d6c471d5...

Opengraph URL: https://github.com/ycode/ycode/issues/548

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fix: stop shipping duplicate JS chunks on published pages","articleBody":"## Summary\n\nPublished sites currently download **two ~499 KB (≈148 KiB gzip) JavaScript chunks** with substantially overlapping modules. On the client website those files are:\n\n- `/_next/static/chunks/d6c471d59bccc477.js` — 487 KiB raw / ≈141 KiB gzip\n- `/_next/static/chunks/85c333a8896677df.js` — 487 KiB raw / ≈141 KiB gzip\n\nThey are not byte-identical (Turbopack minifies each graph separately), but both contain the same Tiptap/ProseMirror stack, rich-text rendering, `layer-utils`, and a `POST /ycode/api/components` helper. Lighthouse flags this as duplicated JavaScript and it is a large share of the 650–730 ms mobile TBT reported by the customer.\n\nCustomer report (14 Sep 2026): mobile Lighthouse 45 / 64, LCP 11.4 s / 3.9 s.\n\n## Why this happens\n\nTwo client entry points both statically import `LayerRendererPublic`:\n\n1. `PageRenderer` (the published page)\n2. `app/(site)/error.tsx` (re-exported by `app/(published)/[[...slug]]/error.tsx`)\n\nNext.js always ships the route error boundary with the page. Because `LayerRendererPublic` pulls a large shared graph (`layer-utils` → `text-format-utils` → `@tiptap/core` via a **circular import** with `lib/tiptap-extensions/rich-text-link.ts`), Turbopack cannot extract a common chunk and emits the graph twice.\n\nRelated: #501 (editor APIs / Tiptap on the public bundle).\n\n## Proposed fix\n\n- Stop importing `LayerRendererPublic` from `error.tsx`. Render a lightweight 500 fallback (or dynamically import the renderer only after the error page data is fetched).\n- Break the `text-format-utils` ↔ `rich-text-link` cycle so a single shared chunk can be extracted if both entries still need render helpers.\n- Confirm with a production (or customer-site) Lighthouse treemap that only one copy of ProseMirror/`layer-utils` ships.\n\n## Test plan\n\n- [ ] Homepage HTML includes only one ~500 KB public-renderer chunk (or a small shared vendor chunk + one entry), not two overlapping copies\n- [ ] Custom 500 page still renders after a thrown error\n- [ ] Mobile Lighthouse unused/duplicated JS for those hashes drops by ~140 KiB transferred\n- [ ] Preview error boundary (`app/(site)/ycode/preview/error.tsx`) is treated the same way\n","author":{"url":"https://github.com/ysamcode","@type":"Person","name":"ysamcode"},"datePublished":"2026-09-15T05:43:35Z","url":"https://github.com/ycode/ycode/issues/548"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:84370c1a-33e7-5cb6-c677-3ead69c7a530
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB6D0:2BFC5C:CE194:10E7DA:6AFE330A
html-safe-nonce23f012016db2891343d6698881a42a58d64fbefe978a8fbb74b236dbe8e8e526
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkQwOjJCRkM1QzpDRTE5NDoxMEU3REE6NkFGRTMzMEEiLCJ2aXNpdG9yX2lkIjoiNDcyNzI1MzU4Mjg4Mzk5MjMzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac451973dc0c087762dc37a63837db0aab4fea81eaaaec644a33ce4bf27629c22a
hovercard-subject-tagissue:5458036387
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ycode/ycode/548/issue_layout
twitter:imagehttps://opengraph.githubassets.com/266c7514355ceef865099303968bb4941ff2e8eaa66f605d098069166fe99ee6/ycode/ycode/issues/548
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/266c7514355ceef865099303968bb4941ff2e8eaa66f605d098069166fe99ee6/ycode/ycode/issues/548
og:image:altSummary Published sites currently download two ~499 KB (≈148 KiB gzip) JavaScript chunks with substantially overlapping modules. On the client website those files are: /_next/static/chunks/d6c471d5...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameysamcode
hostnamegithub.com
expected-hostnamegithub.com
Noned70e31220a67f6376c108d2416fa8e7df854c1065b1672ab7a88ab6dc3a809e2
turbo-cache-controlno-preview
go-importgithub.com/ycode/ycode git https://github.com/ycode/ycode.git
octolytics-dimension-user_id65892203
octolytics-dimension-user_loginycode
octolytics-dimension-repository_id1165452593
octolytics-dimension-repository_nwoycode/ycode
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1165452593
octolytics-dimension-repository_network_root_nwoycode/ycode
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseccb88d9c92abe69245b429398c8a57ae87070c7c
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/ycode/ycode/issues/548#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fycode%2Fycode%2Fissues%2F548
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fycode%2Fycode%2Fissues%2F548
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=ycode%2Fycode
Reloadhttps://github.com/ycode/ycode/issues/548
Reloadhttps://github.com/ycode/ycode/issues/548
Reloadhttps://github.com/ycode/ycode/issues/548
ycodehttps://github.com/ycode
ycodehttps://github.com/ycode/ycode
Codehttps://github.com/ycode/ycode
Issues7 (7)https://github.com/ycode/ycode/issues
Pull requests1 (1)https://github.com/ycode/ycode/pulls
Discussionshttps://github.com/ycode/ycode/discussions
Actionshttps://github.com/ycode/ycode/actions
Projectshttps://github.com/ycode/ycode/projects
Security and quality1 (1)https://github.com/ycode/ycode/security
Insightshttps://github.com/ycode/ycode/insights
https://github.com/ycode/ycode
New issuehttps://github.com/login?return_to=https://github.com/ycode/ycode/issues/548
New issuehttps://github.com/login?return_to=https://github.com/ycode/ycode/issues/548
#558https://github.com/ycode/ycode/pull/558
fix: stop shipping duplicate JS chunks on published pageshttps://github.com/ycode/ycode/issues/548#top
#558https://github.com/ycode/ycode/pull/558
https://github.com/ysamcode
BugSomething isn't workinghttps://github.com/ycode/ycode/issues?q=state%3Aopen%20label%3A%22Bug%22
https://github.com/ysamcode
ysamcodehttps://github.com/ysamcode
on Sep 15, 2026https://github.com/ycode/ycode/issues/548#issue-5458036387
#501https://github.com/ycode/ycode/discussions/501
ysamcodehttps://github.com/ysamcode
on Sep 15, 2026https://github.com/ycode/ycode/issues/548#event-31149765890
ysamcodehttps://github.com/ysamcode
BugSomething isn't workinghttps://github.com/ycode/ycode/issues?q=state%3Aopen%20label%3A%22Bug%22
on Sep 15, 2026https://github.com/ycode/ycode/issues/548#event-31149767229
https://github.com/ysamcode
ysamcodehttps://github.com/ysamcode
on Sep 15, 2026https://github.com/ycode/ycode/issues/548#issuecomment-5675368572
#549https://github.com/ycode/ycode/issues/549
#501https://github.com/ycode/ycode/discussions/501
#550https://github.com/ycode/ycode/issues/550
#551https://github.com/ycode/ycode/issues/551
tristan-mouchethttps://github.com/tristan-mouchet
fix: stop shipping duplicate renderer chunk on published pages #558https://github.com/ycode/ycode/pull/558
on Sep 16, 2026https://github.com/ycode/ycode/issues/548#event-31228998797
https://github.com/ysamcode
ysamcodehttps://github.com/ysamcode
on Sep 17, 2026https://github.com/ycode/ycode/issues/548#issuecomment-5714257237
#558https://github.com/ycode/ycode/pull/558
ysamcodehttps://github.com/ysamcode
completedhttps://github.com/ycode/ycode/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 17, 2026https://github.com/ycode/ycode/issues/548#event-31318506019
Sign up for freehttps://github.com/signup?return_to=https://github.com/ycode/ycode/issues/548
Sign in to commenthttps://github.com/login?return_to=https://github.com/ycode/ycode/issues/548
ysamcodehttps://github.com/ysamcode
BugSomething isn't workinghttps://github.com/ycode/ycode/issues?q=state%3Aopen%20label%3A%22Bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.