Registry / web-framework / rollup-config-pectin

rollup-config-pectin

JSON →
library4.0.4jsnpmunverified

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-pectin
INSTALL
IMPORT
SIG · ROLLUP-CONFIG-PECT
R
rollup-config-pectin
web-frameworkjavascriptv4.0.4
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pectin
✓ import pectin from 'rollup-config-pectin'; export default pectin;
✗ const pectin = require('rollup-config-pectin'); module.exports = pectin;
The package exports a single default configuration object. ESM import is recommended; CommonJS require may still work but is not the primary export.

Shows setup: package.json with main/module, Babel config with modules:false, and using rollup-config-pectin via CLI or programmatic API.

// package.json { "main": "dist/index.cjs.js", "module": "dist/index.esm.js" } // .babelrc (must accept options) { "presets": [ ["@babel/preset-env", { "modules": false }] ] } // rollup.config.js (if using programmatic API) import pectin from 'rollup-config-pectin'; export default pectin({ input: 'src/index.js', output: { dir: 'dist', format: ['cjs', 'es'] } }); // Or via CLI: // rollup -c node:pectin -i src/index.js
rollup --version
Debug
Known issues
gotchaThe package expects both 'main' and 'module' fields in package.json, otherwise output may be incomplete.
fix
Add 'main' and 'module' fields to package.json pointing to your output files.
affects: >=1.0.0
gotchaIf you have a .babelrc, the preset used must accept options (e.g., @babel/preset-env with modules:false), otherwise Rollup's tree-shaking may fail.
fix
Ensure your Babel preset configuration is set appropriately (e.g., {modules: false}).
affects: >=1.0.0
deprecatedThe package uses the older node:pectin preset for Rollup CLI which may become deprecated in future Rollup versions.
fix
Consider using the programmatic API (import default) for future-proofing.
affects: >=4.0.0
Errors
Common errors & fixes
Error: Could not resolve entry module
Missing or incorrect 'input' option or no 'src/index.js' file.
fix
Ensure 'src/index.js' exists or specify correct input path via -i flag or options.
(!) Plugin typescript: @rollup/plugin-typescript: Could not find source file: 'src/index.ts'
The configuration expects a JavaScript file (src/index.js) but only TypeScript files exist.
fix
Rename file to 'src/index.js' or configure rollup-config-pectin with an appropriate plugin for TypeScript.
Error: You must specify 'main' and 'module' in package.json
The preset checks for these fields and throws if missing.
fix
Add both 'main' and 'module' fields to package.json.
Upgrade
Version history
4.0.4latest on npm
Audit
Dependencies
rollupoptionalPeer dependency; the plugin provides Rollup configuration that requires Rollup to be installed.
Agent activity
4 hits · last 30 days
node
4
Resources
rollup-config-pectin — npm install rollup-config-pectin · libregistry