rollup
Installation
SKILL.md
Rollup
Rollup (v4) is the bundler of choice for libraries. It produces smaller, cleaner code than Webpack and pioneered Tree Shaking.
When to Use
- NPM Packages: Building a library for others to use.
- Flat Bundling: "Scope Hoisting" puts everything in one closure for performance.
Core Concepts
Tree Shaking
Rollup analyzes the import graph and excludes unused code statically.
Formats
Outputs esm, cjs, umd, iife.