mu-babel

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

An unofficial fork/package of Babel (formerly 6to5) that transpiles ES6/ES2015 to readable ES5 with source maps. Version 0.0.2 is an early snapshot from the Babel v5 era (circa 2015), long superseded by modern Babel versions. This package is not maintained and should not be used in new projects. Key differentiator: claims readable output, but functionally identical to early Babel releases. Users should prefer the official babel package at v7+.

error Cannot find module 'mu-babel'
cause Package may not be installed or is misspelled.
fix
Run: npm install mu-babel
error mu-babel: Cannot read property 'transform' of undefined
cause Importing the module incorrectly (e.g., using named import for transform).
fix
Use: import babel from 'mu-babel'; then babel.transform(...)
breaking Package mu-babel is an unmaintained fork of Babel v5.x. It lacks support for modern JavaScript (ES2016+), plug-in system, and bug fixes.
fix Migrate to the official babel package: npm uninstall mu-babel && npm install --save-dev @babel/core @babel/cli @babel/preset-env
deprecated The API mirror is Babel v5, which is obsolete. Methods like babel.transform() differ from @babel/core.
fix Use @babel/core and consult its documentation for API changes.
gotcha The package name mu-babel is easily confused with the official babel packages. Installing it may lead to missing security patches and incompatibilities.
fix Always install @babel/core (or babel-cli) from the official scoped package.
npm install mu-babel
yarn add mu-babel
pnpm add mu-babel

Shows how to transpile a simple const declaration using mu-babel with source maps.

const babel = require('mu-babel');
const result = babel.transform('const x = 1;', { sourceMaps: true });
console.log(result.code);
// 'use strict';
// var x = 1;