Registry / broccoli-6to5-transpiler

broccoli-6to5-transpiler

JSON →
library3.0.0jsnpmunverified

This package is deprecated. It was the Broccoli plugin for transpiling ES6 to ES5 using 6to5 (the original name of Babel). The project has been renamed and migrated to `broccoli-babel-transpiler`, which is actively maintained with the latest version v8.0.2 (January 2025). The current package (broccoli-6to5-transpiler) is archived and should not be used. Instead, use `broccoli-babel-transpiler` with `@babel/core` as a peer dependency. Key differentiator: it integrates Babel into the Broccoli build system, supporting Babel plugins and presets, but this deprecated version is incompatible with modern Babel (v7+).

npm install broccoli-6to5-transpiler
INSTALL
IMPORT
SIG · BROCCOLI-6TO5-TRAN
B
broccoli-6to5-transpiler
javascriptv3.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import transpile from 'broccoli-babel-transpiler';
const transpile = require('broccoli-6to5-transpiler');
The package was renamed to 'broccoli-babel-transpiler'. Do not use the old name 'broccoli-6to5-transpiler'. Use default import (or require).
BroccoliBabelTranspiler
import BroccoliBabelTranspiler from 'broccoli-babel-transpiler';
const BroccoliBabelTranspiler = require('broccoli-6to5-transpiler');
The new package name is 'broccoli-babel-transpiler'. This is the default export.
options
import transpile from 'broccoli-babel-transpiler'; const tree = transpile('lib', { presets: [['@babel/preset-env', { targets: { node: 'current' } }]] });
const tree = require('broccoli-6to5-transpiler')('lib', { blacklist: ['es6.classes'] });
The options format changed from 6to5 style (e.g., 'blacklist') to Babel 7+ style (e.g., 'presets', 'plugins'). The old 'blacklist' option is deprecated; use 'exclude' in preset-env.

Demonstrates how to transpile ES6+ JavaScript with Babel in a Broccoli build pipeline using the current 'broccoli-babel-transpiler' package, not the deprecated 'broccoli-6to5-transpiler'.

// Correct usage with broccoli-babel-transpiler (NOT the deprecated broccoli-6to5-transpiler) // Brocfile.js import { createBuilder, createWatcher } from 'broccoli'; import transpile from 'broccoli-babel-transpiler'; import funnel from 'broccoli-funnel'; const app = 'src'; const scripts = funnel(app, { include: ['**/*.js'] }); const transpiled = transpile(scripts, { presets: [ ['@babel/preset-env', { targets: { browsers: ['last 2 versions'] }, modules: false }] ] }); const builder = createBuilder(transpiled); // Export or use the builder as needed export default transpiled;
Debug
Known issues
deprecatedPackage 'broccoli-6to5-transpiler' is renamed and deprecated in favor of 'broccoli-babel-transpiler'. npm registry shows no updates since 2015.
fix
Replace 'broccoli-6to5-transpiler' with 'broccoli-babel-transpiler' in package.json and update imports accordingly.
affects: >=0
breaking6to5 options (e.g., 'blacklist', 'optional') are not supported in Babel 7+. Using them will cause errors.
fix
Use Babel 7+ configuration: 'presets', 'plugins', 'targets' instead of 6to5-specific options.
affects: >=8.0.0
breakingSince v8.0.0, @babel/core must be installed as a peer dependency. Missing it leads to 'Cannot find module @babel/core'.
fix
Install @babel/core: npm install --save-dev @babel/core
affects: >=8.0.0
breakingNode.js 14 support is dropped in broccoli-babel-transpiler v8.0.0. The package may fail on Node 14.
fix
Update Node.js to version 16+ (or use v7.x of broccoli-babel-transpiler for Node 14 compatibility).
affects: >=8.0.0
gotchaThe package 'broccoli-6to5-transpiler' v3.0.0 is archived; its API and behavior are frozen. It does not support modern JavaScript features like async/await without additional plugins.
fix
Migrate to 'broccoli-babel-transpiler' and configure Babel presets appropriately for modern syntax.
affects: ~3.0.0
Errors
Common errors & fixes
Cannot find module '@babel/core'
The package requires @babel/core as a peer dependency (since v8.0.0 of broccoli-babel-transpiler).
fix
Run: npm install --save-dev @babel/core
Error: broccoli-6to5-transpiler is not a function
The package 'broccoli-6to5-transpiler' is deprecated and may not be properly installed or the import is wrong.
fix
Use 'broccoli-babel-transpiler' instead: const transpile = require('broccoli-babel-transpiler');
The 'blacklist' option is not supported in @babel/preset-env
The old 6to5 'blacklist' option is no longer valid in Babel 7+.
fix
Use @babel/preset-env and configure 'exclude' if needed: presets: [['@babel/preset-env', { exclude: ['transform-classes'] }]]
Cannot read property 'transpile' of undefined
Using an incorrect import path or the package is not installed (misnamed).
fix
Ensure you have installed 'broccoli-babel-transpiler' and import it correctly.
Upgrade
Version history
3.0.0latest on npm
Audit
Dependencies
@babel/corerequiredSince v8.0.0 of broccoli-babel-transpiler, @babel/core is moved to peer dependencies; this package does not bundle its own Babel version.
Agent activity
2 hits · last 30 days
node
2
Resources
broccoli-6to5-transpiler — npm install broccoli-6to5-transpiler · libregistry