Skip to content

Conversation

pieterbeulque
Copy link
Contributor

@pieterbeulque pieterbeulque commented Sep 19, 2025

Big maintenance run on apps/web to update dependencies, cut some fat and hopefully optimize builds a bit.

  • Update dependencies to their latest minor version
  • Next.js upgrade to v15, React to v19, and Tailwind upgrade to v4 are still due
  • Update react-day-picker to the latest major version due to type issues
  • Enable Turbopack in development to speed up development builds
  • Remove Storybook & Chromatic because we don't effectively use this
  • Remove Jest & the single dummy test we had
  • Avoid unnecessarily loading SASS for styles—we didn't use any SASS features anyway
  • Do not use the bundled version of Shiki for syntax highlighting (this blew up our bundle size a lot)
  • Remove barrel file imports for icons

That last one is one that we'll have to enforce (I'll look into a linter rule). Simply put, use

import YourIcon from '@mui/material-icons/YourIcon'

instead of

import { YourIcon } from '@mui/material-icons'

Something is going wrong with the tree-shaking and in my testing it makes a big difference on both total bundle output size and build time.

Copy link

vercel bot commented Sep 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
polar Ignored Ignored Preview Sep 22, 2025 9:09am
polar-sandbox Ignored Ignored Preview Sep 22, 2025 9:09am

@frankie567
Copy link
Member

@pieterbeulque pieterbeulque force-pushed the pieterbeulque/clients-dependency-upgrade-cw38 branch from cb7a9c6 to d1bbdec Compare September 22, 2025 07:41
Copy link
Contributor

github-actions bot commented Sep 22, 2025

📦 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 158.74 KB (🟡 +49 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!

Ninety-five 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 12.86 KB 171.59 KB 49.03% (🟢 -0.01%)
/_not-found/page 360 B 159.09 KB 45.45% (+/- <0.01%)
/layout 58.17 KB 216.91 KB 61.97% (🟡 +0.64%)
/error 10.64 KB 169.38 KB 48.39% (+/- <0.01%)
/global-error 10.68 KB 169.41 KB 48.40% (+/- <0.01%)
/checkout/[clientSecret]/confirmation/page 272.78 KB 431.52 KB 123.29% (🟡 +0.60%)
/checkout/[clientSecret]/page 261.89 KB 420.63 KB 120.18% (🟡 +0.52%)
/(main)/oauth2/authorize/page 36.55 KB 195.29 KB 55.80% (🟡 +0.10%)
/(main)/layout 34.88 KB 193.61 KB 55.32% (🟡 +0.69%)
/(main)/signup/page 91.87 KB 250.61 KB 71.60% (🟡 +0.85%)
/(main)/purchases/products/[id]/page 359 B 159.09 KB 45.45% (+/- <0.01%)
/(main)/start/page 360 B 159.09 KB 45.45% (+/- <0.01%)
/(main)/login/code/verify/page 27.25 KB 185.98 KB 53.14% (🟡 +0.05%)
/(main)/verify-email/page 361 B 159.09 KB 45.45% (🟡 +0.01%)
/(main)/login/page 127.77 KB 286.51 KB 81.86% (🟡 +0.86%)
/(main)/(topbar)/error/page 2.58 KB 161.32 KB 46.09% (+/- <0.01%)
/(main)/(topbar)/layout 202.31 KB 361.05 KB 103.16% (🟡 +0.89%)
/(main)/(topbar)/not-found 12.86 KB 171.59 KB 49.03% (🟢 -0.01%)
/(main)/[organization]/(header)/donate/page 359 B 159.09 KB 45.45% (+/- <0.01%)
/(main)/[organization]/(header)/layout 224.75 KB 383.49 KB 109.57% (🟡 +0.89%)
/(main)/[organization]/(header)/page 116.27 KB 275 KB 78.57% (🟡 +0.20%)
/(main)/[organization]/(header)/products/[productId]/page 244.63 KB 403.36 KB 115.25% (🟡 +0.65%)
/(main)/[organization]/(header)/subscriptions/page 361 B 159.09 KB 45.45% (🟡 +0.01%)
/(main)/[organization]/portal/authenticate/page 63.19 KB 221.93 KB 63.41% (🟡 +0.13%)
/(main)/[organization]/portal/layout 46.54 KB 205.27 KB 58.65% (+/- <0.01%)
/(main)/[organization]/portal/orders/[id]/page 251.83 KB 410.57 KB 117.30% (🟡 +0.02%)
/(main)/[organization]/portal/orders/page 274.66 KB 433.4 KB 123.83% (🟡 +0.79%)
/(main)/[organization]/portal/overview/page 280.37 KB 439.11 KB 125.46% (🟡 +0.67%)
/(main)/[organization]/portal/page 360 B 159.09 KB 45.45% (+/- <0.01%)
/(main)/[organization]/portal/request/page 58.73 KB 217.47 KB 62.13% (🟡 +0.14%)
/(main)/[organization]/portal/settings/page 173.95 KB 332.68 KB 95.05% (🟢 -0.14%)
/(main)/[organization]/portal/subscriptions/[id]/page 236.86 KB 395.59 KB 113.03% (🟡 +0.58%)
/(main)/[organization]/portal/usage/page 120.08 KB 278.82 KB 79.66% (🟡 +0.43%)
/(main)/dashboard/page 362 B 159.09 KB 45.45% (🟡 +0.01%)
/(main)/dashboard/layout 11.92 KB 170.66 KB 48.76% (+/- <0.01%)
/(main)/vision/page 164.71 KB 323.45 KB 92.41% (🟡 +15.69%)
/(main)/vision/layout 360 B 159.09 KB 45.45% (+/- <0.01%)
/(main)/signup/nextjs-hackathon/page 231.17 KB 389.91 KB 111.40% (🟡 +16.74%)
/(main)/(landing)/resources/merchant-of-record/page 138.78 KB 297.52 KB 85.00% (🟡 +0.88%)
/(main)/(landing)/layout 184.39 KB 343.13 KB 98.04% (🟡 +0.88%)
/(main)/(landing)/resources/why/page 144.27 KB 303.01 KB 86.57% (🟡 +0.88%)
/(main)/(landing)/resources/page 29.06 KB 187.79 KB 53.66% (🟡 +0.10%)
/(main)/(landing)/page 278.81 KB 437.54 KB 125.01% (🟡 +16.74%)
/(main)/(landing)/resources/pricing/page 38.42 KB 197.16 KB 56.33% (🟡 +0.10%)
/(main)/(landing)/careers/page 29.62 KB 188.36 KB 53.82% (🟡 +0.10%)
/(main)/dashboard/(create)/create/page 159.79 KB 318.52 KB 91.01% (🟡 +0.91%)
/(main)/dashboard/(create)/layout 361 B 159.09 KB 45.45% (🟡 +0.01%)
/(main)/dashboard/account/layout 220.69 KB 379.42 KB 108.41% (🟡 +0.93%)
/(main)/dashboard/[organization]/storefront/page 334.06 KB 492.8 KB 140.80% (🟡 +0.33%)
/(main)/dashboard/account/developer/page 181.41 KB 340.15 KB 97.19% (🟡 +1.22%)
/(main)/dashboard/account/preferences/page 124.99 KB 283.73 KB 81.07% (🟡 +0.86%)
/(main)/(landing)/(mdx)/blog/(header)/build-saas-with-polar/page 6.8 KB 165.54 KB 47.30% (🟡 +0.05%)
/(main)/(landing)/(mdx)/layout 360 B 159.09 KB 45.45% (🟡 +0.01%)
/(main)/(landing)/(mdx)/blog/(header)/introducing-license-keys/page 5.97 KB 164.71 KB 47.06% (+/- <0.01%)
/(main)/(landing)/(mdx)/blog/(header)/mitchell-hashimoto-joins-polar-as-an-advisor/page 5.99 KB 164.73 KB 47.06% (+/- <0.01%)
/(main)/(landing)/(mdx)/blog/(header)/introducing-digital-products/page 8.7 KB 167.43 KB 47.84% (🟡 +0.18%)
/(main)/(landing)/(mdx)/blog/(header)/polar-seed-announcement/page 5.96 KB 164.69 KB 47.06% (🟢 -0.01%)
/(main)/(landing)/(mdx)/blog/(header)/upsell-private-github-repositories/page 7.87 KB 166.6 KB 47.60% (🟡 +0.17%)
/(main)/(landing)/(mdx)/blog/page 15.61 KB 174.34 KB 49.81% (🟡 +0.42%)
/(main)/(landing)/(mdx)/company/page 34.25 KB 192.99 KB 55.14% (🟡 +0.10%)
/(main)/(landing)/(mdx)/blog/(header)/upsell-discord-invites/page 7.29 KB 166.02 KB 47.44% (🟡 +0.06%)
/(main)/(landing)/(mdx)/legal/privacy/page 5.52 KB 164.26 KB 46.93% (+/- <0.01%)
/(main)/(landing)/(mdx)/legal/terms/page 5.52 KB 164.26 KB 46.93% (+/- <0.01%)
/(main)/dashboard/[organization]/(header)/(home)/page 341.51 KB 500.25 KB 142.93% (🟡 +0.93%)
/(main)/dashboard/[organization]/(header)/layout 221.16 KB 379.9 KB 108.54% (🟡 +0.93%)
/(main)/dashboard/[organization]/(header)/benefits/page 308.88 KB 467.61 KB 133.60% (🟡 +1.05%)
/(main)/dashboard/[organization]/(header)/analytics/page 357.15 KB 515.89 KB 147.40% (🟡 +1.44%)
/(main)/dashboard/[organization]/(header)/customers/page 376.38 KB 535.11 KB 152.89% (🟡 +1.73%)
/(main)/dashboard/[organization]/(header)/finance/account/page 276.61 KB 435.34 KB 124.38% (🟡 +0.92%)
/(main)/dashboard/[organization]/(header)/products/[id]/page 424.2 KB 582.94 KB 166.55% (🟡 +0.97%)
/(main)/dashboard/[organization]/(header)/products/discounts/page 271.88 KB 430.62 KB 123.03% (🟡 +1.28%)
/(main)/dashboard/[organization]/(header)/products/checkout-links/page 256.33 KB 415.07 KB 118.59% (🟡 +0.86%)
/(main)/dashboard/[organization]/(header)/products/new/page 300.27 KB 459.01 KB 131.15% (🟡 +0.95%)
/(main)/dashboard/[organization]/(header)/sales/[id]/page 301.41 KB 460.14 KB 131.47% (🟡 +1.06%)
/(main)/dashboard/[organization]/(header)/sales/checkouts/[id]/page 276.42 KB 435.15 KB 124.33% (🟡 +0.91%)
/(main)/dashboard/[organization]/(header)/products/page 237.14 KB 395.87 KB 113.11% (🟡 +1.02%)
/(main)/dashboard/[organization]/(header)/sales/checkouts/page 252.2 KB 410.94 KB 117.41% (🟡 +0.76%)
/(main)/dashboard/[organization]/(header)/sales/page 252.44 KB 411.18 KB 117.48% (🟡 +0.76%)
/(main)/dashboard/[organization]/(header)/sales/subscriptions/[id]/page 240.96 KB 399.7 KB 114.20% (🟡 +0.90%)
/(main)/dashboard/[organization]/(header)/settings/page 260.95 KB 419.69 KB 119.91% (🟡 +0.94%)
/(main)/dashboard/[organization]/(header)/sales/subscriptions/page 246.56 KB 405.3 KB 115.80% (🟡 +0.93%)
/(main)/dashboard/[organization]/(header)/settings/custom-fields/page 251.25 KB 409.99 KB 117.14% (🟡 +0.93%)
/(main)/dashboard/[organization]/(header)/settings/members/page 244.31 KB 403.05 KB 115.16% (🟡 +0.93%)
/(main)/dashboard/[organization]/(header)/settings/webhooks/page 233.49 KB 392.23 KB 112.06% (🟡 +0.93%)
/(main)/dashboard/[organization]/(header)/settings/webhooks/endpoints/[id]/page 263.74 KB 422.48 KB 120.71% (🟡 +1.64%)
/(main)/dashboard/[organization]/(header)/usage-billing/events/page 336.29 KB 495.03 KB 141.44% (🟡 +17.46%)
/(main)/dashboard/[organization]/(header)/usage-billing/meters/create/page 232.92 KB 391.66 KB 111.90% (🟡 +0.93%)
/(main)/dashboard/[organization]/onboarding/integrate/page 271.56 KB 430.3 KB 122.94% (🟡 +15.90%)
/(main)/dashboard/[organization]/onboarding/layout 361 B 159.09 KB 45.45% (+/- <0.01%)
/(main)/dashboard/[organization]/(header)/usage-billing/page 360 B 159.09 KB 45.45% (+/- <0.01%)
/(main)/dashboard/[organization]/onboarding/product/page 264.21 KB 422.95 KB 120.84% (🟡 +0.97%)
/(main)/dashboard/[organization]/(header)/usage-billing/meters/page 464.53 KB 623.27 KB 178.08% (🟡 +17.58%)
/(main)/dashboard/[organization]/(header)/finance/(wide)/income/page 168.68 KB 327.41 KB 93.55% (🟡 +0.43%)
/(main)/dashboard/[organization]/(header)/finance/(wide)/layout 220.62 KB 379.35 KB 108.39% (🟡 +0.93%)
/(main)/dashboard/[organization]/(header)/finance/(wide)/payouts/page 212.09 KB 370.82 KB 105.95% (🟡 +0.56%)
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.

@pieterbeulque pieterbeulque force-pushed the pieterbeulque/clients-dependency-upgrade-cw38 branch from 39c047f to 8bba5ec Compare September 22, 2025 09:09
@pieterbeulque pieterbeulque merged commit c39c19c into main Sep 22, 2025
12 checks passed
@pieterbeulque pieterbeulque deleted the pieterbeulque/clients-dependency-upgrade-cw38 branch September 22, 2025 09:16
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.

2 participants