A Rollup configuration preset for building tree-shakeable JavaScript libraries using conventional file patterns. Version 4.0.4 requires Node >=8.9 and Rollup >=1.12.0. It simplifies setting up Rollup with Babel and ensures proper main/module exports for ESM and CJS. Differentiators: convention over configuration, zero-config unless custom Babel preset options needed, and explicit support for tree-shaking via peer dependencies. Aimed at library authors who want a minimal Rollup setup without manual config.
npm install rollup-config-pectinVerified import paths — ran on the pinned version, not inferred.
Shows setup: package.json with main/module, Babel config with modules:false, and using rollup-config-pectin via CLI or programmatic API.
Add 'main' and 'module' fields to package.json pointing to your output files.
Ensure your Babel preset configuration is set appropriately (e.g., {modules: false}).Consider using the programmatic API (import default) for future-proofing.
Ensure 'src/index.js' exists or specify correct input path via -i flag or options.
Rename file to 'src/index.js' or configure rollup-config-pectin with an appropriate plugin for TypeScript.
Add both 'main' and 'module' fields to package.json.