bundle-optimization

Analyze client bundle size reports and optimize imports with tree-shaking and lazy-loading.

6|5|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/podverse/podverse --skill bundle-optimization-podverse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bundle-optimization
Source: https://github.com/podverse/podverse/tree/main/.cursor/skills/bundle-optimization
Command: npx skills add https://github.com/podverse/podverse --skill bundle-optimization-podverse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams keep the web application's client bundle size under control as changes are made, reducing load times and improving UX.

Core Features & Use Cases

  • Measure real bundle size: Leverage bundle analyzer outputs to guide decisions and verify improvements.
  • Tree-shaking and modular imports: Favor named and subpath imports to avoid pulling in large libraries.
  • Lazy-load heavy UI: Break up large components and load them on demand to minimize initial payload.
  • Dependency hygiene: Avoid client-side use of server-only helpers; ensure libraries marked with sideEffects: false where possible.

Quick Start

Run the bundle analyzer and apply the recommended optimizations to the apps/web codebase.

Frequently Asked Questions about bundle-optimization

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

FAQPage Schema
How do I reduce client bundle size when adding new dependencies?

Reduce client bundle size by applying tree-shaking, favoring named and subpath imports, and marking libraries with sideEffects: false to avoid pulling unnecessary client code.

What is the best way to lazy-load heavy UI components for web performance?

The best way to lazy-load heavy UI components is to break up large components and load them on demand to minimize the initial payload and improve web performance.

How does tree-shaking work with subpath imports?

Tree-shaking with subpath imports works by allowing you to import specific modules rather than entire libraries, actively excluding unused exports from the final client bundle.

Why does my bundle size increase after updating helpers?

Your bundle size increases after updating helpers because server-only helpers may have been imported into client code, or the changes introduced heavy dependencies without proper tree-shaking.

Do I need a bundle analyzer to measure real bundle size?

Yes, you need a bundle analyzer to measure real bundle size, as it provides the required outputs to guide decisions and verify that lazy-loading and import changes work.

When should I not use lazy-loading for client bundles?

You should not use lazy-loading for client bundles when the UI component is critical for initial page render, as loading it on demand will delay user experience and increase load times.