A gulp plugin that replaces gulp-babel by transpiling files with Babel while automatically collecting external helpers into a separate module. Version 2.2.2 is the latest stable release, with sporadic updates. It avoids polluting the global scope with babel helpers by generating a shared helpers file and injecting require statements into each transpiled file. Unlike gulp-babel or manual babel setup, it automates external helper management without global pollution.
npm install gulp-babel-helpersVerified import paths — ran on the pinned version, not inferred.
Transpile JavaScript files with Babel and collect external helpers into a separate helpers.js file.
Ensure the second argument is a relative path from the source root, e.g., './helpers.js' for a file at src/helpers.js.
Set '@babel/plugin-external-helpers' or 'externalHelpers: true' in your babel config.
Switch to gulp-babel + babel-plugin-external-helpers or a more modern setup.
Run 'npm install gulp-babel-helpers --save-dev'
Use 'import babelHelpers from ...' or 'const babelHelpers = require(...).default'
Add 'externalHelpers: true' to your babel config object
Ensure the second argument to babelHelpers matches the filename that will be created in the dest