Bundle Size Analysis & Optimization
I'll analyze your JavaScript bundle size, identify large dependencies, suggest tree-shaking opportunities, and recommend code splitting strategies.
Supported Build Tools:
- Webpack (webpack-bundle-analyzer)
- Vite (rollup-plugin-visualizer)
- esbuild (esbuild-visualizer)
- Rollup (rollup-plugin-visualizer)
- Next.js (@next/bundle-analyzer)
Arguments: $ARGUMENTS - optional: production/development or specific entry point
Token Optimization
Expected range: 300–2,500 tokens (initial), 200 tokens (cache hit)
Caching: Caches build tool detection in .claude/cache/bundle-analyze/build-tool.json for 7 days. Invalidated when package.json changes.
Early exit: Returns immediately for already-analyzed bundles or if no build output exists.
Patterns used: Grep-before-Read, early exit, Bash for system queries, caching