bundle-size

Analyze frontend bundles and apply tree shaking, code splitting, and lazy loading.

105|8|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/686f6c61/alfred-dev --skill bundle-size
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bundle-size
Source: https://github.com/686f6c61/alfred-dev/tree/main/skills/rendimiento/bundle-size
Command: npx skills add https://github.com/686f6c61/alfred-dev --skill bundle-size

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the critical issue of large frontend bundle sizes, which directly impact website loading times, user experience, and data consumption.

Core Features & Use Cases

  • Bundle Analysis: Visually inspect bundle contents to identify oversized dependencies and code.
  • Optimization Strategies: Apply techniques like tree shaking, code splitting, and lazy loading.
  • Dependency Management: Suggest lightweight alternatives to heavy libraries.
  • Performance Measurement: Track bundle size changes and loading performance before and after optimization.
  • Use Case: A frontend application's JavaScript bundle has grown to over 1MB, causing slow load times on mobile devices. This Skill will analyze the bundle, identify redundant libraries and large components, and implement code splitting to reduce the initial load size.

Quick Start

Analyze the current frontend bundle size and identify the largest components.

Frequently Asked Questions about bundle-size

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce frontend bundle size when my JavaScript file exceeds 1MB?

Tree shaking eliminates unused code from your bundle, code splitting divides your bundle into smaller chunks, and lazy loading defers loading non-critical components until needed, collectively reducing initial bundle size and improving load performance.

What's the best way to identify which dependencies are increasing my bundle size?

Bundle analysis works by visualizing the composition of your built JavaScript or CSS files, showing the relative size of each module and dependency, allowing you to pinpoint redundant libraries and large components causing bloat.

Do I need bundler-specific tools to perform frontend bundle optimization?

Beyond tree shaking and code splitting, you can reduce bundle size by replacing heavy libraries with lightweight alternatives, implementing lazy loading for non-critical components, and tracking bundle size changes before and after optimization to measure performance impact.

Why does my web application load slowly on mobile devices despite having a small codebase?

Bundle size optimization is generally safe, but limitations include potential race conditions from lazy loading, incomplete tree shaking with certain library patterns, and the need to ensure code splitting doesn't fragment shared dependencies excessively.