一覧へ戻る
waynevanson/rollup-stream-gulp(新しいタブで開きます)
主要言語: TypeScript
Implentation of Rollup as a stream and Rollup as a Gulp plugin
- star 数
- 2
- watcher 数
- 1
- fork 数
- 0
- issue 数
- 1
- 最終更新
- 2021/06/10
主要言語: TypeScript
Implentation of Rollup as a stream and Rollup as a Gulp plugin
A gulp plugin, and hopefully with enough work, love and consensus becomes @rollup/gulp
yarn add -D rollup-stream-gulp
Currently the recommended way is to use @rollup/stream. This works well, but has a few limitations.
requires \vinyl-source-stream``options.manualChunks not supportedAccepts all the RollupOption's excluding input, which is gathered from gulp.src().
// gulpfile.ts import gulp from "gulp"; import rollup from "rollup-stream-gulp"; // import rollup from "@rollup/gulp"; // generates two files, both in different formats under the `dist` directory. export const build = async () => gulp .src("src/index.ts") .pipe( rollup({ output: [ { file: "index.js", format: "cjs" }, { file: "index.mjs", format: "esm" }, ], }) ) .pipe(gulp.dest("dist"));
There are a few caveats.
Internally we use options.input = file.path, which means we may not get errors about file conflicts.
We'll be looking to address these later on.