{"id":21415,"library":"gulp-rollup-each","title":"gulp-rollup-each","description":"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.","status":"active","version":"4.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/ko-yelie/gulp-rollup-each","tags":["javascript","gulp","gulpplugin","rollup","static-site"],"install":[{"cmd":"npm install gulp-rollup-each","lang":"bash","label":"npm"},{"cmd":"yarn add gulp-rollup-each","lang":"bash","label":"yarn"},{"cmd":"pnpm add gulp-rollup-each","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency, core bundler","package":"rollup","optional":false},{"reason":"peer dependency, plugin for Gulp pipeline","package":"gulp","optional":true}],"imports":[{"note":"ESM default export; CJS users use require('gulp-rollup-each').default.","wrong":"const { rollupEach } = require('gulp-rollup-each')","symbol":"default","correct":"import rollupEach from 'gulp-rollup-each'"},{"note":"CommonJS usage; default export is the function itself.","wrong":"const { rollupEach } = require('gulp-rollup-each')","symbol":"default","correct":"const rollupEach = require('gulp-rollup-each')"},{"note":"No named export 'rollupEach' in ESM.","wrong":"import { rollupEach } from 'gulp-rollup-each'","symbol":"default","correct":"import rollupEach from 'gulp-rollup-each'"}],"quickstart":{"code":"const gulp = require('gulp');\nconst rollupEach = require('gulp-rollup-each');\n\nfunction scripts() {\n  return gulp\n    .src(['src/**/*.js', '!src/**/_*'])\n    .pipe(rollupEach({ output: { format: 'iife' } }))\n    .pipe(gulp.dest('dist'));\n}\n\nexports.default = scripts;","lang":"javascript","description":"Basic Gulp task that bundles each JS file under src with Rollup in IIFE format, excluding files prefixed with underscore."},"warnings":[{"fix":"Update Rollup to v1.x for v3.x, or v2.x for v4.x.","message":"v3.0.0 dropped Rollup 0.x support, only Rollup 1.0.0+. v4.0.0 dropped Rollup 1.x, only Rollup 2.x.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Remove `isCache` and configure cache via Rollup's inputOptions.cache.","message":"The `isCache` option is deprecated; Rollup cache is now managed internally. Use Rollup's cache option instead.","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"Do not specify `input` in inputOptions; use gulp.src() to define entry files.","message":"The `input` option is ignored because it is set automatically from gulp.src() file paths.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Always pass both arguments or use a function for the second argument to avoid ambiguity.","message":"If 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.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use `import rollupEach from 'gulp-rollup-each'` or `const rollupEach = require('gulp-rollup-each')`.","cause":"Importing incorrectly (e.g., destructuring a named export).","error":"TypeError: rollupEach is not a function"},{"fix":"Remove `input` from inputOptions; the input comes from gulp.src().","cause":"Passing `input` in inputOptions.","error":"Error: The `input` option cannot be specified as gulp-rollup-each option."},{"fix":"Use Rollup's `cache` property: `cache: true` or a cache object. Remove `isCache`.","cause":"Using deprecated `isCache` option or malformed cache object.","error":"Error: Rollup's `cache` option must be an object or boolean, but got something else."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}