Thanks to visit codestin.com
Credit goes to github.com

Skip to content

🎯 Bundle Optimization Roadmap: Reduce vendor bundle from 1.3MB to <500KB #356

@bdougie

Description

@bdougie

Overview

This is the main tracking issue for implementing the bundle optimization strategies outlined in #355. Our goal is to reduce the react-vendor bundle from 1.3MB to under 500KB through systematic optimizations.

Current State

  • React vendor bundle: 1.3MB
  • Major contributors:
    • 30 Radix UI components
    • Dual charting libraries (Recharts + Nivo)
    • Dual icon libraries (react-icons + lucide-react)
    • React 18.3.1 core

Target State

  • Target bundle size: <500KB initial load
  • Maintain: All current functionality
  • Improve: Lighthouse performance scores

Implementation Phases

Phase 1: Analysis & Quick Wins (Week 1)

Must be completed first:

Can be done in parallel after analysis:

Phase 2: Major Library Optimizations (Weeks 2-3)

Can be done independently:

Phase 3: Code Splitting (Weeks 3-4)

Can be done independently:

Phase 4: Component Optimization (Week 5+)

Depends on Phase 1 analysis:

Expected Outcomes

Strategy Bundle Savings Priority Issue
Chart library consolidation 550KB IMMEDIATE #359
Icon consolidation 370KB IMMEDIATE #358
Route code splitting 400-650KB* HIGH #360
Vite build config 150-200KB HIGH #361
Radix optimization 100-150KB MEDIUM #362

*Initial load reduction

Implementation Order

Can be done in parallel (after #357):

Must wait for #357 completion:

Success Criteria

  • React vendor bundle reduced to <500KB
  • No runtime errors from missing dependencies
  • All existing functionality maintained
  • Lighthouse performance score improved by 10+ points

References

Notes

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions