Closed domoritz closed 1 year ago
The example in the readme
import rollupStream from '@rollup/stream'; import gulp from 'gulp'; import terser from 'gulp-terser'; import source from 'vinyl-source-stream'; gulp.task('rollup', () => { const options = { input: 'src/index.js' }; return rollupStream(options) .pipe(source('bundle.js')) .pipe(terser({ keep_fnames: true, mangle: false })) .pipe(gulp.dest('dist')); });
Causes an error Error: You must supply an options object.
Error: You must supply an options object
I fixed it by setting the output
import rollupStream from '@rollup/stream'; import gulp from 'gulp'; import terser from 'gulp-terser'; import source from 'vinyl-source-stream'; gulp.task('rollup', () => { const options = { input: 'src/index.js', output: { format: 'cjs' } }; return rollupStream(options) .pipe(source('bundle.js')) .pipe(terser({ keep_fnames: true, mangle: false })) .pipe(gulp.dest('dist')); });
This isn't a very frequently maintained package. We'd be happy to review a PR from the community to resolve the issue.
The example in the readme
Causes an error
Error: You must supply an options object
.I fixed it by setting the output