首页 > 解决方案 > How to Bundle with Gulp + Rollup?

问题描述

How may I configure gulp with rollup to bundle multiple transpiled javascript files into a single file? Essentially, I'd like to supply the (gulp) transpiled code to rollup to bundle. Would it be possible to choose the bundle mechanism, i.e. iife, namespacing, etc? Below is my gulpfile:

const {dest, series} = require('gulp');
const ts = require('gulp-typescript');
const tsProject = ts.createProject('tsconfig.json');

const transpile = () => {
 return tsProject
.src()
.pipe(tsProject())
.pipe(dest('dist'));
};

exports.default = transpile;

标签: javascriptnode.jstypescriptgulprollupjs

解决方案


推荐阅读