Skip to content

feat: reduce frontend bundle size with tree shaking and dependency audit#422

Open
od-hunter wants to merge 1 commit into
Smartdevs17:mainfrom
od-hunter:feat/frontend-bundle-optimization
Open

feat: reduce frontend bundle size with tree shaking and dependency audit#422
od-hunter wants to merge 1 commit into
Smartdevs17:mainfrom
od-hunter:feat/frontend-bundle-optimization

Conversation

@od-hunter
Copy link
Copy Markdown

@od-hunter od-hunter commented May 28, 2026

Closes #380


#380

- Add @next/bundle-analyzer with ANALYZE=true script for bundle visibility
- Configure next.config.ts: transpilePackages for Web3 libs, optimizePackageImports
  for lucide-react/framer-motion/all Radix UI packages, Node.js polyfill fallbacks
- Lazy-init @web3auth/modal via getWeb3Auth() async fn — removes ~500KB from
  initial bundle; SDK only loads on first social login click
- Scope WagmiProvider + QueryClientProvider to dashboard routes only via
  DashboardProviders — landing page no longer loads wagmi/viem
- Convert landing page (app/page.tsx) to Server Component; extract animated
  sections into minimal client islands (HeroCTA, HeroAnimations)
- Dynamically import Sidebar, Header, PWAWrapper in dashboard layout
- Dynamically import SocialLogin and WalletConnect on auth page with skeleton
  fallbacks so Web3 SDK is deferred until tab renders
- Replace framer-motion motion.div entrance animations in all dashboard pages
  with zero-JS CSS FadeIn component (animate-fade-in-up keyframe)
- Fix web3auth logout: use provider check instead of non-existent .connected prop
- Fix auth page provider race: DashboardProviders is static import so WagmiProvider
  is mounted before WalletConnect calls useConnect()
- Remove unused DashboardInvoice import and dead handleSubmitWork function
@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

@od-hunter is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 28, 2026

@od-hunter 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

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.

Reduce frontend bundle size with tree shaking and dependency audit

1 participant