Skip to content

feat(web): code-split admin, charts, and wallet adapters - #1324

Open
oluwaseyi1996-netizen wants to merge 3 commits into
drydocs:mainfrom
oluwaseyi1996-netizen:feat/code-split-admin-charts-wallet-adapters
Open

oluwaseyi1996-netizen wants to merge 3 commits into
drydocs:mainfrom
oluwaseyi1996-netizen:feat/code-split-admin-charts-wallet-adapters

Conversation

@oluwaseyi1996-netizen

@oluwaseyi1996-netizen oluwaseyi1996-netizen commented Nov 19, 2026 •

Copy link
Copy Markdown

Summary

  • Lazy-load AdminLogin so admin panels are isolated in a separate chunk and not loaded on the default dashboard path.
  • Lazy-load YieldHistoryChart and Recharts so chart libraries load only when a position with history is rendered.
  • Dynamically load wallet SDKs (@stellar/freighter-api, @lobstrco/signer-extension-api, @creit.tech/xbull-wallet-connect) on demand when the picker opens or a wallet is chosen.
  • Configure Vite manual chunks (admin, chart-vendor, stellar-sdk) and disable modulePreload to prevent prefetching off-path chunks on dashboard load.
  • Add checked-in bundle-report.json with recorded baseline (~2.26 MB) and a 450 KB budget limit.
  • Keep build script as tsc && vite build (preserving standard production and Vercel builds) and run the bundle size gate as a separate CI step (pnpm bundle:check).
  • Add check-bundle-budget.mjs script and bundle-budget.test.ts unit tests to fail CI if initial JS exceeds budget.
  • Initial entry JavaScript is reduced from 2,260 KB to ~310 KB (~86.3% reduction vs baseline).

Test plan

  • pnpm lint && pnpm typecheck && pnpm test pass locally
  • Verified split chunks produced during pnpm --filter @meridian/web build
  • Verified pnpm bundle:check passes with 86.3% reduction
  • Verified apps/web/src/__tests__/bundle-budget.test.ts passes
  • Verified pnpm bundle:check step configured in .github/workflows/ci.yml

Closes #1307

@vercel

vercel Bot commented Nov 19, 2026

Copy link
Copy Markdown

@oluwaseyi1996-netizen is attempting to deploy a commit to the Collins' projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Nov 19, 2026

Copy link
Copy Markdown

@oluwaseyi1996-netizen Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@collinsezedike collinsezedike left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oluwaseyi1996-netizen the description has no ## Test plan. Restructure it to PULL_REQUEST_TEMPLATE.md.

Comment thread apps/web/package.json Resolved

This branch has not been deployed

No deployments
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.

[Frontend] Code-split admin, charts, and wallet adapters

2 participants