Skip to content

perf: Add bundle analysis to CI pipeline #221

@Xhristin3

Description

@Xhristin3

Problem Statement

The Next.js app has 28 Radix UI dependencies plus recharts, embla-carousel, date-fns, sonner, lucide-react, and zod. No bundle analysis tooling exists to track bundle size regressions. Imported-but-unused dependencies silently increase page load weight.

Evidence

No @next/bundle-analyzer in devDependencies. CI has no bundle size check step.

Impact

Bundle bloat goes undetected. Users experience slow page loads. Tree-shaking effectiveness is unknown. No budget constraints enforced.

Proposed Solution

  1. Add @next/bundle-analyzer to app devDependencies
  2. Add ANALYZE=true npm run build script
  3. Add CI step that builds with analysis enabled and reports sizes
  4. Set initial bundle budget thresholds

Acceptance Criteria

  • Bundle analyzer configured
  • CI reports bundle sizes per page
  • Report visible in PR comments or as artifact

File Map

  • app/next.config.mjs — add bundle analyzer
  • app/package.json — add analyze script
  • .github/workflows/ci.yml — add analysis step

Labels: performance
Priority: Low | Difficulty: Intermediate | Estimated Effort: 1d


Labels: performance
Priority: Low | Difficulty: Intermediate | Estimated Effort: 1d
Backlog ID: REPO-038

Metadata

Metadata

Labels

performancePerformance improvements

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions