gulp-babel-transpiler
raw JSON → 0.1.1 verified Fri May 01 auth: no javascript abandoned
Gulp plugin to transpile ES6 (ES2015) files to ES5 using babel-core. Current version 0.1.1, no known release cadence. Key differentiator: wraps babel-core as a Gulp pipeline plugin, but is very early and unmaintained. Consider using @babel/gulp-babel instead, as this package is essentially abandoned and relies on outdated babel-core 5.x.
Common errors
error Cannot find module 'babel-core' ↓
cause babel-core is a peer dependency not listed in package.json, but required at runtime.
fix
npm install babel-core --save-dev
error babel is not a function ↓
cause Trying to use named import from ESM or destructure require.
fix
Use 'const babel = require('gulp-babel-transpiler');'
Warnings
deprecated Package uses babel-core 5.x which is no longer maintained. Use @babel/gulp-babel with babel 6+ and presets. ↓
fix Migrate to @babel/gulp-babel and @babel/preset-env.
gotcha No options for presets or plugins; all options are passed directly to babel-core 5.x transform, which has different API compared to babel 6+. ↓
fix If you need modern Babel features, switch to @babel/gulp-babel.
breaking Package has no named exports; require('gulp-babel-transpiler') returns a single function. Do not destructure or import named. ↓
fix Use const babel = require('gulp-babel-transpiler');
Install
npm install gulp-babel-transpiler yarn add gulp-babel-transpiler pnpm add gulp-babel-transpiler Imports
- default (transpile) wrong
import transpile from 'gulp-babel-transpiler';correctvar transpile = require('gulp-babel-transpiler'); - babel (pipe usage) wrong
.pipe(babel({ presets: ['es2015'] }))correct.pipe(babel())
Quickstart
var gulp = require('gulp');
var babel = require('gulp-babel-transpiler');
gulp.task('default', function() {
return gulp.src('./es6/*.js')
.pipe(babel())
.pipe(gulp.dest('./es5_app'));
});