polarsource / polar

An Open Source Lemon Squeezy alternative with better pricing! Get paid coding on your passion.
https://polar.sh
Apache License 2.0
2.85k stars 117 forks source link

clients/next: implement nextjs guide #4218

Closed emilwidlund closed 1 week ago

vercel[bot] commented 1 week ago

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

Name Status Preview Comments Updated (UTC)
polar 🔄 Building (Inspect) Visit Preview 💬 Add feedback Oct 18, 2024 1:44pm
polar-sandbox 🔄 Building (Inspect) Visit Preview 💬 Add feedback Oct 18, 2024 1:44pm
github-actions[bot] commented 1 week ago

📦 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 190.86 KB (🟡 +10 B)
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!

New Pages Added

The following pages were added to the bundle from the code in this PR:

Page Size (compressed) First Load % of Budget (350 KB)
/docs/guides/(mdx)/page 31.09 KB 221.95 KB 63.41%
/docs/guides/layout 421.11 KB 611.97 KB 174.85%
/docs/guides/(mdx)/nextjs/page 33.48 KB 224.33 KB 64.10%

Forty-seven 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)
/(topbar)/layout 252.31 KB 443.17 KB 126.62% (🟡 +0.03%)
/[organization]/[repo]/layout 243.01 KB 433.87 KB 123.96% (🟡 +0.04%)
/backoffice/layout 546.14 KB 737 KB 210.57% (🟡 +1.25%)
/docs/api/[...endpoint]/page 478.05 KB 668.91 KB 191.12% (🟡 +1.26%)
/docs/layout 240.74 KB 431.6 KB 123.31% (🟡 +0.04%)
/(landing)/layout 214.56 KB 405.42 KB 115.83% (🟡 +0.06%)
/dashboard/[organization]/(header)/(home)/page 634.92 KB 825.77 KB 235.93% (🟡 +1.26%)
/dashboard/[organization]/(header)/layout 546.14 KB 737 KB 210.57% (🟡 +1.25%)
/dashboard/[organization]/(header)/analytics/page 675.75 KB 866.6 KB 247.60% (🟡 +1.25%)
/dashboard/[organization]/(header)/benefits/license-keys/page 575.09 KB 765.95 KB 218.84% (🟡 +1.25%)
/dashboard/[organization]/(header)/benefits/page 627.6 KB 818.46 KB 233.85% (🟡 +1.25%)
/dashboard/[organization]/(header)/donations/overview/page 669.44 KB 860.29 KB 245.80% (🟡 +1.25%)
/dashboard/[organization]/(header)/issues/organizations/page 548.72 KB 739.58 KB 211.31% (🟡 +1.25%)
/dashboard/[organization]/(header)/issues/badge/page 569.44 KB 760.3 KB 217.23% (🟡 +1.25%)
/dashboard/[organization]/(header)/members/page 547.13 KB 737.99 KB 210.85% (🟡 +1.25%)
/dashboard/[organization]/(header)/issues/overview/page 586.63 KB 777.49 KB 222.14% (🟡 +1.25%)
/dashboard/[organization]/(header)/posts/analytics/page 665.53 KB 856.39 KB 244.68% (🟡 +1.25%)
/dashboard/[organization]/(header)/products/page 577.08 KB 767.93 KB 219.41% (🟡 +1.25%)
/dashboard/[organization]/(header)/products/benefits/page 627.6 KB 818.46 KB 233.85% (🟡 +1.25%)
/dashboard/[organization]/(header)/posts/page 657.73 KB 848.59 KB 242.45% (🟡 +1.25%)
/dashboard/[organization]/(header)/promote/page 553.22 KB 744.08 KB 212.59% (🟡 +1.25%)
/dashboard/[organization]/(header)/sales/page 576.56 KB 767.42 KB 219.26% (🟡 +1.25%)
/dashboard/[organization]/(header)/sales/subscriptions/page 576.28 KB 767.14 KB 219.18% (🟡 +1.25%)
/dashboard/[organization]/(header)/settings/page 570.82 KB 761.67 KB 217.62% (🟡 +1.25%)
/dashboard/[organization]/(header)/settings/webhooks/endpoints/[id]/page 579.17 KB 770.03 KB 220.01% (🟡 +1.25%)
/dashboard/[organization]/(overlay)/layout 546.77 KB 737.63 KB 210.75% (🟡 +1.25%)
/dashboard/[organization]/(white)/posts/[post]/page 639.65 KB 830.51 KB 237.29% (🟡 +1.25%)
/dashboard/[organization]/(white)/layout 546.15 KB 737 KB 210.57% (🟡 +1.25%)
/dashboard/[organization]/products/[id]/page 619.31 KB 810.17 KB 231.48% (🟡 +1.25%)
/dashboard/[organization]/products/layout 546.15 KB 737 KB 210.57% (🟡 +1.25%)
/dashboard/[organization]/products/new/page 617.14 KB 808 KB 230.86% (🟡 +1.25%)
/(landing)/(mdx)/legal/privacy/page 31.09 KB 221.95 KB 63.41% (+/- <0.01%)
/(landing)/(mdx)/careers/page 31.09 KB 221.95 KB 63.41% (+/- <0.01%)
/docs/(mdx)/layout 421.12 KB 611.97 KB 174.85% (🟡 +1.26%)
/docs/(mdx)/finance/payouts/page 31.09 KB 221.95 KB 63.41% (+/- <0.01%)
/docs/(mdx)/github/funding-yaml/page 31.09 KB 221.95 KB 63.41% (+/- <0.01%)
/docs/(mdx)/merchant-of-record/compliance/page 31.09 KB 221.95 KB 63.41% (+/- <0.01%)
/docs/(mdx)/payments-taxes/page 31.09 KB 221.95 KB 63.41% (+/- <0.01%)
/docs/api/(mdx)/layout 421.11 KB 611.97 KB 174.85% (🟡 +1.26%)
/docs/api/(mdx)/sdk/github-actions/page 33.48 KB 224.33 KB 64.10% (+/- <0.01%)
/docs/contribute/page 33.48 KB 224.33 KB 64.10% (+/- <0.01%)
/docs/contribute/layout 421.12 KB 611.97 KB 174.85% (🟡 +1.26%)
/docs/support/(mdx)/faq/page 33.48 KB 224.33 KB 64.10% (+/- <0.01%)
/docs/support/layout 421.11 KB 611.97 KB 174.85% (🟡 +1.26%)
/docs/support/(mdx)/page 31.09 KB 221.95 KB 63.41% (+/- <0.01%)
/dashboard/[organization]/(header)/finance/layout 546.14 KB 737 KB 210.57% (🟡 +1.25%)
/dashboard/[organization]/(header)/finance/issue-funding/layout 546.14 KB 737 KB 210.57% (🟡 +1.25%)
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.