Gulp plugin for babel-globals that allows you to define global variable names for Babel modules during a Gulp build pipeline. Version 2.0.0 is the latest stable release, with no frequent updates. It wraps babel-globals (v2.x) to integrate with Gulp streams. Differentiators: it provides a Gulp-friendly API for handling ES6 module globals, which is useful for legacy builds or specific bundling needs. Alternatives include using Babel directly with custom plugins.
npm install gulp-babel-globalsVerified import paths — ran on the pinned version, not inferred.
Shows basic usage: pipe JavaScript files through gulp-babel-globals with options
Ensure input files have .js extension or configure gulp.src accordingly.
Always provide a 'bundleFileName' option in the options object.
Use an alternative approach for Babel 7 or higher, such as custom Gulp transforms.
Run 'npm install babel-globals' alongside gulp-babel-globals.
Use 'const babelGlobals = require("gulp-babel-globals")' or 'import babelGlobals from "gulp-babel-globals"'.