Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clients/web: use full bundle for client-side Shiki #3623

Merged
merged 1 commit into from
Jul 9, 2024
Merged

Conversation

frankie567
Copy link
Member

Attempt to fix #3622

Not sure to merge it though, I fear the bundle size might explode.

Copy link

vercel bot commented Jul 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
polar ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2024 2:03pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
polar-next-js-example ⬜️ Ignored (Inspect) Visit Preview Jul 9, 2024 2:03pm

Copy link
Contributor

github-actions bot commented Jul 9, 2024

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 226.42 KB (🟡 +2.3 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

One Hundred Thirty-nine Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/not-found 44.86 KB 271.29 KB 77.51% (+/- <0.01%)
/_not-found/page 178 B 226.6 KB 64.74% (+/- <0.01%)
/layout 56.49 KB 282.91 KB 80.83% (🟡 +0.01%)
/error 9.63 KB 236.05 KB 67.44% (+/- <0.01%)
/global-error 9.63 KB 236.05 KB 67.44% (+/- <0.01%)
/maintainer/page 449.49 KB 675.91 KB 193.12% (🟡 +1.21%)
/me/page 10.4 KB 236.82 KB 67.66% (+/- <0.01%)
/oauth2/authorize/page 35.32 KB 261.74 KB 74.78% (🟡 +0.01%)
/login/page 67.72 KB 294.14 KB 84.04% (+/- <0.01%)
/login/magic-link/request/page 178 B 226.6 KB 64.74% (+/- <0.01%)
/new/page 11.12 KB 237.54 KB 67.87% (+/- <0.01%)
/signup/maintainer/page 37.31 KB 263.73 KB 75.35% (+/- <0.01%)
/(installation)/github/installation/page 63.78 KB 290.2 KB 82.92% (+/- <0.01%)
/(installation)/github/layout 178 B 226.6 KB 64.74% (+/- <0.01%)
/(topbar)/error/page 2.29 KB 228.71 KB 65.35% (+/- <0.01%)
/(topbar)/layout 183.43 KB 409.85 KB 117.10% (🟡 +0.01%)
/(topbar)/not-found 44.86 KB 271.29 KB 77.51% (+/- <0.01%)
/(topbar)/checkout/success/page 94.57 KB 320.99 KB 91.71% (+/- <0.01%)
/(topbar)/unsubscribe/page 31.42 KB 257.84 KB 73.67% (+/- <0.01%)
/[organization]/(sidebar)/donate/page 198.03 KB 424.45 KB 121.27% (🟡 +0.01%)
/[organization]/(sidebar)/layout 192.64 KB 419.07 KB 119.73% (🟡 +0.01%)
/[organization]/(sidebar)/donate/status/page 39.92 KB 266.35 KB 76.10% (+/- <0.01%)
/[organization]/(sidebar)/issues/page 127.4 KB 353.82 KB 101.09% (🟡 +0.01%)
/[organization]/(sidebar)/posts/[postSlug]/page 197.64 KB 424.06 KB 121.16% (🟡 +0.01%)
/[organization]/(sidebar)/page 231.21 KB 457.63 KB 130.75% (🟡 +0.01%)
/[organization]/(sidebar)/products/[productId]/page 135.88 KB 362.3 KB 103.51% (🟡 +0.01%)
/[organization]/(sidebar)/posts/page 138.98 KB 365.4 KB 104.40% (+/- <0.01%)
/[organization]/(sidebar)/products/page 103.4 KB 329.82 KB 94.24% (+/- <0.01%)
/[organization]/(sidebar)/subscriptions/page 157.6 KB 384.02 KB 109.72% (+/- <0.01%)
/[organization]/(sidebar)/repositories/page 67.48 KB 293.9 KB 83.97% (+/- <0.01%)
/[organization]/[repo]/issues/[number]/(create)/page 154.78 KB 381.2 KB 108.91% (🟡 +0.01%)
/[organization]/[repo]/layout 132.24 KB 358.66 KB 102.48% (+/- <0.01%)
/[organization]/[repo]/issues/[number]/status/page 181.28 KB 407.7 KB 116.49% (+/- <0.01%)
/[organization]/[repo]/page 222.59 KB 449.01 KB 128.29% (🟡 +0.01%)
/[organization]/subscribe/page 144.63 KB 371.06 KB 106.02% (+/- <0.01%)
/[organization]/subscribe/layout 10.4 KB 236.82 KB 67.66% (🟡 +0.01%)
/backoffice/badge/page 53.04 KB 279.46 KB 79.85% (+/- <0.01%)
/backoffice/layout 456.68 KB 683.1 KB 195.17% (🟡 +1.21%)
/backoffice/issue/[id]/page 62.63 KB 289.05 KB 82.59% (+/- <0.01%)
/backoffice/rebadge/page 39.78 KB 266.2 KB 76.06% (+/- <0.01%)
/backoffice/rewards_pending/page 66.25 KB 292.67 KB 83.62% (+/- <0.01%)
/maintainer/(onboarding)/[organization]/onboarding/page 123.17 KB 349.59 KB 99.88% (🟡 +0.01%)
/maintainer/(onboarding)/layout 178 B 226.6 KB 64.74% (+/- <0.01%)
/maintainer/[organization]/page 10.4 KB 236.82 KB 67.66% (+/- <0.01%)
/maintainer/[organization]/layout 10.43 KB 236.85 KB 67.67% (+/- <0.01%)
/backoffice/page 2.29 KB 228.71 KB 65.35% (+/- <0.01%)
/docs/api/[...endpoint]/page 420.82 KB 647.25 KB 184.93% (🟡 +1.21%)
/docs/layout 130.65 KB 357.08 KB 102.02% (🟡 +0.01%)
/(landing)/(features)/benefits/page 138.82 KB 365.25 KB 104.36% (+/- <0.01%)
/(landing)/layout 108.14 KB 334.56 KB 95.59% (+/- <0.01%)
/(landing)/(features)/donations/page 138.82 KB 365.24 KB 104.36% (+/- <0.01%)
/(landing)/(features)/issue-funding/page 138.82 KB 365.25 KB 104.36% (+/- <0.01%)
/(landing)/(features)/newsletters/page 154.42 KB 380.85 KB 108.81% (🟡 +0.01%)
/(landing)/page 138.69 KB 365.12 KB 104.32% (+/- <0.01%)
/(landing)/(features)/products/page 153.86 KB 380.28 KB 108.65% (🟡 +0.01%)
/(topbar)/(backer)/purchases/page 178 B 226.6 KB 64.74% (+/- <0.01%)
/(topbar)/(backer)/layout 53.7 KB 280.12 KB 80.03% (🟡 +0.01%)
/(topbar)/(backer)/error 415 B 226.83 KB 64.81% (+/- <0.01%)
/(topbar)/(backer)/purchases/products/[id]/page 209.78 KB 436.2 KB 124.63% (🟡 +0.01%)
/(topbar)/(backer)/purchases/products/page 103.31 KB 329.73 KB 94.21% (+/- <0.01%)
/(topbar)/(backer)/purchases/subscriptions/[id]/page 211.69 KB 438.11 KB 125.18% (+/- <0.01%)
/(topbar)/(backer)/purchases/subscriptions/page 96.69 KB 323.12 KB 92.32% (+/- <0.01%)
/(topbar)/(backer)/settings/page 216 KB 442.42 KB 126.41% (+/- <0.01%)
/maintainer/[organization]/(topbar)/donations/overview/page 573.88 KB 800.31 KB 228.66% (🟡 +1.21%)
/maintainer/[organization]/(topbar)/layout 456.68 KB 683.1 KB 195.17% (🟡 +1.21%)
/maintainer/[organization]/(topbar)/donations/donors/page 178 B 226.6 KB 64.74% (+/- <0.01%)
/maintainer/[organization]/(topbar)/donations/page 178 B 226.6 KB 64.74% (+/- <0.01%)
/maintainer/[organization]/(topbar)/funding/page 477.79 KB 704.22 KB 201.20% (🟡 +1.22%)
/maintainer/[organization]/(topbar)/initialize/page 150.66 KB 377.08 KB 107.74% (+/- <0.01%)
/maintainer/[organization]/(topbar)/issues/badge/page 468.87 KB 695.29 KB 198.65% (🟡 +1.22%)
/maintainer/[organization]/(topbar)/issues/overview/page 485.05 KB 711.47 KB 203.28% (🟡 +1.21%)
/maintainer/[organization]/(topbar)/members/page 446.82 KB 673.24 KB 192.35% (🟡 +1.22%)
/maintainer/[organization]/(topbar)/overview/page 473.41 KB 699.83 KB 199.95% (🟡 +1.21%)
/maintainer/[organization]/(topbar)/posts/page 557.54 KB 783.96 KB 223.99% (🟡 +1.21%)
/maintainer/[organization]/(topbar)/posts/analytics/page 566.99 KB 793.41 KB 226.69% (🟡 +1.21%)
/maintainer/[organization]/(topbar)/products/benefits/page 538.76 KB 765.18 KB 218.62% (🟡 +1.22%)
/maintainer/[organization]/(topbar)/products/overview/page 476.25 KB 702.68 KB 200.76% (🟡 +1.22%)
/maintainer/[organization]/(topbar)/sales/orders/page 479.22 KB 705.64 KB 201.61% (🟡 +1.22%)
/maintainer/[organization]/(topbar)/sales/overview/page 570.48 KB 796.9 KB 227.69% (🟡 +1.21%)
/maintainer/[organization]/(topbar)/sales/subscriptions/page 492.09 KB 718.51 KB 205.29% (🟡 +1.21%)
/maintainer/[organization]/(topbar)/settings/page 462.35 KB 688.77 KB 196.79% (🟡 +1.21%)
/maintainer/[organization]/(topbar)/settings/webhooks/endpoints/[id]/page 488.74 KB 715.16 KB 204.33% (🟡 +1.22%)
/maintainer/[organization]/(white)/posts/[post]/page 554.5 KB 780.92 KB 223.12% (🟡 +1.22%)
/maintainer/[organization]/(white)/layout 441.34 KB 667.76 KB 190.79% (🟡 +1.21%)
/maintainer/[organization]/(white)/posts/new/page 552.14 KB 778.56 KB 222.45% (🟡 +1.21%)
/maintainer/[organization]/products/new/page 527.85 KB 754.27 KB 215.51% (🟡 +1.21%)
/maintainer/[organization]/products/layout 441.34 KB 667.76 KB 190.79% (🟡 +1.21%)
/maintainer/[organization]/promote/page 463.33 KB 689.75 KB 197.07% (🟡 +1.21%)
/maintainer/[organization]/promote/layout 441.34 KB 667.76 KB 190.79% (🟡 +1.21%)
/maintainer/[organization]/products/[id]/page 528.17 KB 754.59 KB 215.60% (🟡 +1.21%)
/docs/(mdx)/benefits/page 30.51 KB 256.93 KB 73.41% (+/- <0.01%)
/docs/(mdx)/layout 393.08 KB 619.5 KB 177.00% (🟡 +1.21%)
/docs/(mdx)/ads/page 31.29 KB 257.71 KB 73.63% (+/- <0.01%)
/docs/(mdx)/donations/page 30.51 KB 256.93 KB 73.41% (+/- <0.01%)
/docs/(mdx)/faq/for-backers/page 30.51 KB 256.93 KB 73.41% (+/- <0.01%)
/docs/(mdx)/faq/for-contributors/page 30.51 KB 256.93 KB 73.41% (+/- <0.01%)
/docs/(mdx)/faq/for-maintainers/page 32.79 KB 259.22 KB 74.06% (+/- <0.01%)
/docs/(mdx)/faq/overview/page 30.51 KB 256.93 KB 73.41% (+/- <0.01%)
/docs/(mdx)/guides/page 30.51 KB 256.93 KB 73.41% (+/- <0.01%)
/docs/(mdx)/issue-funding/getting-started/page 34.5 KB 260.93 KB 74.55% (+/- <0.01%)
/docs/(mdx)/issue-funding/overview/page 31.04 KB 257.47 KB 73.56% (+/- <0.01%)
/docs/(mdx)/issue-funding/promote/page 31.09 KB 257.51 KB 73.57% (🟡 +0.01%)
/docs/(mdx)/issue-funding/reward-contributors/page 31.3 KB 257.72 KB 73.63% (🟡 +0.01%)
/docs/(mdx)/issue-funding/workflow/page 34.83 KB 261.25 KB 74.64% (+/- <0.01%)
/docs/(mdx)/page 30.96 KB 257.38 KB 73.54% (+/- <0.01%)
/docs/(mdx)/newsletters/page 31.61 KB 258.03 KB 73.72% (+/- <0.01%)
/docs/(mdx)/payments-taxes/page 33.94 KB 260.36 KB 74.39% (+/- <0.01%)
/docs/(mdx)/subscriptions/page 30.51 KB 256.93 KB 73.41% (+/- <0.01%)
/docs/api/(mdx)/github-actions/page 30.51 KB 256.93 KB 73.41% (+/- <0.01%)
/docs/api/(mdx)/layout 393.06 KB 619.49 KB 177.00% (🟡 +1.20%)
/docs/api/(mdx)/authentication/page 33.4 KB 259.82 KB 74.23% (+/- <0.01%)
/docs/api/(mdx)/page 30.51 KB 256.93 KB 73.41% (+/- <0.01%)
/docs/api/(mdx)/polar-sdk/page 32.79 KB 259.22 KB 74.06% (+/- <0.01%)
/docs/api/(mdx)/webhooks/page 31.32 KB 257.74 KB 73.64% (+/- <0.01%)
/docs/api/(mdx)/webhooks/events/page 25.51 KB 251.93 KB 71.98% (+/- <0.01%)
/docs/contribute/page 32.79 KB 259.22 KB 74.06% (+/- <0.01%)
/docs/contribute/layout 393.08 KB 619.5 KB 177.00% (🟡 +1.21%)
/docs/support/page 30.51 KB 256.93 KB 73.41% (+/- <0.01%)
/docs/support/layout 393.08 KB 619.5 KB 177.00% (🟡 +1.21%)
/(landing)/(mdx)/careers/page 30.51 KB 256.93 KB 73.41% (+/- <0.01%)
/(landing)/(mdx)/layout 178 B 226.6 KB 64.74% (+/- <0.01%)
/(topbar)/(backer)/(sidebar)/feed/page 136.19 KB 362.61 KB 103.60% (+/- <0.01%)
/(topbar)/(backer)/(sidebar)/layout 91.28 KB 317.7 KB 90.77% (+/- <0.01%)
/(topbar)/(backer)/(sidebar)/funding/page 201.22 KB 427.64 KB 122.18% (🟡 +0.01%)
/(topbar)/(backer)/finance/incoming/page 186.95 KB 413.37 KB 118.11% (+/- <0.01%)
/(topbar)/(backer)/finance/layout 154.25 KB 380.67 KB 108.76% (🟡 +0.01%)
/(topbar)/(backer)/finance/account/page 172.08 KB 398.5 KB 113.86% (+/- <0.01%)
/(topbar)/(backer)/finance/issue-funding/page 71.59 KB 298.01 KB 85.15% (+/- <0.01%)
/(topbar)/(backer)/finance/issue-funding/contributors/page 71 KB 297.43 KB 84.98% (+/- <0.01%)
/(topbar)/(backer)/finance/rewards/page 71.09 KB 297.51 KB 85.00% (+/- <0.01%)
/(topbar)/(backer)/finance/outgoing/page 139.07 KB 365.5 KB 104.43% (+/- <0.01%)
/maintainer/[organization]/(topbar)/finance/incoming/page 188.35 KB 414.77 KB 118.51% (+/- <0.01%)
/maintainer/[organization]/(topbar)/finance/layout 441.34 KB 667.76 KB 190.79% (🟡 +1.21%)
/maintainer/[organization]/(topbar)/finance/account/page 173.18 KB 399.6 KB 114.17% (🟡 +0.01%)
/maintainer/[organization]/(topbar)/finance/outgoing/page 140.13 KB 366.55 KB 104.73% (+/- <0.01%)
/maintainer/[organization]/(topbar)/finance/issue-funding/page 73.01 KB 299.43 KB 85.55% (+/- <0.01%)
/maintainer/[organization]/(topbar)/finance/issue-funding/layout 441.34 KB 667.76 KB 190.79% (🟡 +1.21%)
/maintainer/[organization]/(topbar)/finance/issue-funding/rewarded/page 72.29 KB 298.71 KB 85.34% (🟡 +0.01%)
/maintainer/[organization]/(topbar)/finance/issue-funding/contributors/page 72.29 KB 298.71 KB 85.35% (+/- <0.01%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@frankie567
Copy link
Member Author

The size increase looks reasonable, probably because Shiki is able to async load languages on demand. Will merge it!

@frankie567 frankie567 marked this pull request as ready for review July 9, 2024 13:46
@frankie567 frankie567 enabled auto-merge (rebase) July 9, 2024 13:46
@frankie567 frankie567 merged commit c944eee into main Jul 9, 2024
10 of 12 checks passed
@frankie567 frankie567 deleted the fix/3622 branch July 9, 2024 13:48
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.

Missing languages in client-side code highlighter
1 participant