{"id":21416,"library":"gulp-rollup-lightweight","title":"gulp-rollup-lightweight","description":"A thin lightweight Gulp plugin that wraps Rollup's JavaScript API into a Readable Stream, compatible with Gulp 4.x and Rollup 1.x. Version 1.0.11 is the latest stable release (no recent maintenance). It differs from alternatives like gulp-rollup by being simpler and supporting custom Rollup instances. Suitable for building bundles with ES modules and CommonJS via plugins.","status":"maintenance","version":"1.0.11","language":"javascript","source_language":"en","source_url":"https://github.com/b1lly/gulp-rollup-lightweight","tags":["javascript","badges","gulp","rollup","stream","plugin"],"install":[{"cmd":"npm install gulp-rollup-lightweight","lang":"bash","label":"npm"},{"cmd":"yarn add gulp-rollup-lightweight","lang":"bash","label":"yarn"},{"cmd":"pnpm add gulp-rollup-lightweight","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency for bundling; must be installed separately or provided via config","package":"rollup","optional":true}],"imports":[{"note":"CommonJS default export. ESM import may not work due to missing default export.","wrong":"import rollup from 'gulp-rollup-lightweight';","symbol":"default","correct":"const rollup = require('gulp-rollup-lightweight');"},{"note":"ESM imports are supported if the consuming project uses ESM, but the package itself is CJS.","wrong":null,"symbol":"default","correct":"import rollup from 'gulp-rollup-lightweight';"},{"note":"Only default export exists; named exports are not available.","wrong":"const { rollup } = require('gulp-rollup-lightweight');","symbol":"default","correct":"const rollup = require('gulp-rollup-lightweight').default;"}],"quickstart":{"code":"const { dest } = require('gulp');\nconst rollup = require('gulp-rollup-lightweight');\nconst source = require('vinyl-source-stream');\n\nfunction bundle() {\n  return rollup({\n    input: './src/main.js',\n    output: {\n      format: 'umd'\n    }\n  })\n  .pipe(source('app.js'))\n  .pipe(dest('./dist'));\n}\n\nexports.bundle = bundle;","lang":"javascript","description":"Basic Gulp task using gulp-rollup-lightweight to bundle ES modules into UMD format."},"warnings":[{"fix":"Replace with npm install @rollup/plugin-node-resolve @rollup/plugin-commonjs and update imports.","message":"rollup-plugin-node-resolve and rollup-plugin-commonjs are deprecated; use @rollup/plugin-node-resolve and @rollup/plugin-commonjs instead.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Use gulp-plumber or try-catch in the task function.","message":"Stream will emit error if Rollup build fails; ensure proper error handling in Gulp pipeline.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"npm install --save-dev vinyl-source-stream","message":"The plugin does not include vinyl-source-stream; you must install it separately to create virtual files.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade to Rollup 1.x+ and Gulp 4.x+.","message":"Version 1.0.0 dropped support for Rollup <1.0 and Gulp <4.","severity":"breaking","affected_versions":"<1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"npm install rollup --save-dev OR pass custom rollup instance via options.rollup","cause":"Rollup is not installed or not provided in config.","error":"Error: Cannot find module 'rollup'"},{"fix":"Use const rollup = require('gulp-rollup-lightweight'); (no destructuring)","cause":"Importing a named export instead of default.","error":"TypeError: rollup is not a function"},{"fix":"Add input: './src/main.js' to the rollup() options.","cause":"Missing 'input' option in the config object.","error":"Error: 'input' is required"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}