gulp-es6-module-transpiler

raw JSON →
0.2.2 verified Fri May 01 auth: no javascript deprecated

Gulp plugin for the ES6 Module Transpiler, a tool that converts ES6 module syntax (import/export) to CommonJS or AMD. Version 0.2.2 is the latest, released in 2015. The plugin integrates the es6-module-transpiler into Gulp build pipelines. It supports configuration of formatters (bundle, commonjs), base path, import paths, and source maps. Key differentiators: it was part of the early ES6 module transpilation ecosystem, but it is now deprecated due to the adoption of Babel and other modern transpilers. The underlying transpiler is no longer maintained, and the plugin has not received updates since 2015.

error Error: Cannot find module 'es6-module-transpiler'
cause Missing peer dependency es6-module-transpiler.
fix
Run: npm install es6-module-transpiler
error TypeError: Cannot read property 'formatter' of undefined
cause Invalid formatter name passed to transpile options.
fix
Use one of: 'bundle', 'commonjs', or a valid formatter object/constructor.
deprecated Package is deprecated: no updates since 2015, underlying es6-module-transpiler is unmaintained.
fix Use modern transpilers like Babel or TypeScript.
gotcha Only 'bundle' and 'commonjs' formatters are supported with es6-module-transpiler >=0.9.0.
fix Use an AMD formatter package like es6-module-transpiler-amd-formatter for AMD output.
gotcha The plugin outputs one file per input file for formatter 'commonjs', but 'bundle' combines all files.
fix Specify formatter explicitly: 'bundle' or 'commonjs'.
breaking Version 0.2.0 broke compatibility with es6-module-transpiler <0.5.0.
fix Update es6-module-transpiler to >=0.5.0.
npm install gulp-es6-module-transpiler
yarn add gulp-es6-module-transpiler
pnpm add gulp-es6-module-transpiler

Basic usage: pipe ES6 module files through the transpiler, outputting bundled CommonJS modules.

var gulp = require('gulp');
var transpile = require('gulp-es6-module-transpiler');

gulp.task('build', function() {
    return gulp.src('src/**/*.js')
        .pipe(transpile({
            formatter: 'bundle'
        }))
        .pipe(gulp.dest('lib'));
});