{"id":21417,"library":"gulp-rollup-plugin","title":"gulp-best-rollup","description":"Gulp plugin wrapping Rollup for ES module bundling, upgraded to ESM and Gulp v4. Latest version: 2.0.0. Provides a simple pipeable interface to integrate Rollup into Gulp workflows, supporting sourcemaps and custom Rollup config. Differentiates from gulp-better-rollup by being ESM-only and compatible with Rollup 3.x. Release cadence: low.","status":"maintenance","version":"2.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/tborychowski/gulp-rollup-plugin","tags":["javascript","gulp","rollup"],"install":[{"cmd":"npm install gulp-rollup-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add gulp-rollup-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add gulp-rollup-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; required for bundling","package":"rollup","optional":false}],"imports":[{"note":"ESM-only; require() not supported.","wrong":"const rollup = require('gulp-best-rollup')","symbol":"default","correct":"import rollup from 'gulp-best-rollup'"},{"note":"Default export is a function, not a namespace.","wrong":"import * as rollup from 'gulp-best-rollup'","symbol":"default","correct":"import rollup from 'gulp-best-rollup'"},{"note":"No named export; use default import.","wrong":"import { rollup } from 'gulp-best-rollup'","symbol":"default","correct":"import rollup from 'gulp-best-rollup'"}],"quickstart":{"code":"import gulp from 'gulp';\nimport sourcemaps from 'gulp-sourcemaps';\nimport rollup from 'gulp-best-rollup';\n\nexport function js() {\n  return gulp.src('./src/index.js')\n    .pipe(sourcemaps.init())\n    .pipe(rollup({\n      plugins: []\n    }, {\n      file: 'index.js',\n      format: 'esm'\n    }))\n    .pipe(sourcemaps.write(''))\n    .pipe(gulp.dest('dist'));\n}","lang":"javascript","description":"Transpile and bundle a JavaScript file using Rollup via Gulp, with sourcemap support."},"warnings":[{"fix":"Use import syntax or downgrade to a CJS-compatible alternative like gulp-better-rollup.","message":"Package is ESM-only; does not support CommonJS require().","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Install rollup@^3.1.0 alongside this package.","message":"Requires Rollup 3.x as peer dependency; incompatible with Rollup 2.x or 4.x.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Upgrade Node.js to >=14 and Gulp to v4.","message":"Requires Node.js >= 14 and Gulp v4; not compatible with older versions.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Install as npm i -D gulp-best-rollup.","message":"Package name does not match npm registry name. npm name is 'gulp-best-rollup', not 'gulp-rollup-plugin'.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Switch to import syntax and ensure your project is configured for ESM (e.g., 'type': 'module' in package.json).","cause":"Using CommonJS require() to import an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module not supported"},{"fix":"Run npm i -D rollup@^3.1.0.","cause":"Missing peer dependency 'rollup'.","error":"Cannot find module 'rollup'"},{"fix":"Upgrade Gulp to v4 (gulp@^4.0.0).","cause":"Using Gulp v3 with this plugin.","error":"Gulp version mismatch: gulp is not a function or pipe is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}