Registry / devops / gulp-rollup-each

gulp-rollup-each

JSON →
library4.0.1jsnpmunverified

Gulp plugin for Rollup that processes multiple input files individually, each with its own Rollup bundle. Current stable version is 4.0.1 (Rollup v2, released 2021). Release cadence is low; the plugin has been stable with occasional updates for Rollup major versions. Key differentiator: unlike other gulp-rollup plugins that combine all files into a single bundle, this plugin preserves the file-per-bundle pattern useful for static sites or multi-page apps. Supports Rollup cache, external modules, and custom rollup instance.

npm install gulp-rollup-each
INSTALL
IMPORT
SIG · GULP-ROLLUP-EACH
G
gulp-rollup-each
devopsjavascriptv4.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

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

default
import rollupEach from 'gulp-rollup-each'
const { rollupEach } = require('gulp-rollup-each')
ESM default export; CJS users use require('gulp-rollup-each').default.
default
const rollupEach = require('gulp-rollup-each')
const { rollupEach } = require('gulp-rollup-each')
CommonJS usage; default export is the function itself.
default
import rollupEach from 'gulp-rollup-each'
import { rollupEach } from 'gulp-rollup-each'
No named export 'rollupEach' in ESM.

Basic Gulp task that bundles each JS file under src with Rollup in IIFE format, excluding files prefixed with underscore.

const gulp = require('gulp'); const rollupEach = require('gulp-rollup-each'); function scripts() { return gulp .src(['src/**/*.js', '!src/**/_*']) .pipe(rollupEach({ output: { format: 'iife' } })) .pipe(gulp.dest('dist')); } exports.default = scripts;
Debug
Known issues
breakingv3.0.0 dropped Rollup 0.x support, only Rollup 1.0.0+. v4.0.0 dropped Rollup 1.x, only Rollup 2.x.
fix
Update Rollup to v1.x for v3.x, or v2.x for v4.x.
affects: >=3.0.0
deprecatedThe `isCache` option is deprecated; Rollup cache is now managed internally. Use Rollup's cache option instead.
fix
Remove `isCache` and configure cache via Rollup's inputOptions.cache.
affects: >=4.0.0
gotchaThe `input` option is ignored because it is set automatically from gulp.src() file paths.
fix
Do not specify `input` in inputOptions; use gulp.src() to define entry files.
affects: >=1.0.0
gotchaIf you omit the second argument, the `output` property inside the first argument is used as outputOptions. This can be confusing when using a function for options.
fix
Always pass both arguments or use a function for the second argument to avoid ambiguity.
affects: >=2.0.0
Errors
Common errors & fixes
TypeError: rollupEach is not a function
Importing incorrectly (e.g., destructuring a named export).
fix
Use `import rollupEach from 'gulp-rollup-each'` or `const rollupEach = require('gulp-rollup-each')`.
Error: The `input` option cannot be specified as gulp-rollup-each option.
Passing `input` in inputOptions.
fix
Remove `input` from inputOptions; the input comes from gulp.src().
Error: Rollup's `cache` option must be an object or boolean, but got something else.
Using deprecated `isCache` option or malformed cache object.
fix
Use Rollup's `cache` property: `cache: true` or a cache object. Remove `isCache`.
Upgrade
Version history
4.0.1latest on npm
Audit
Dependencies
rolluprequiredpeer dependency, core bundler
gulpoptionalpeer dependency, plugin for Gulp pipeline
Agent activity
4 hits · last 30 days
node
4
Resources
gulp-rollup-each — npm install gulp-rollup-each · libregistry