Babbybel

raw JSON →
1.0.0 verified Fri May 01 auth: no javascript abandoned

Babbybel is a lightweight runtime transpiler for adding ES Harmony module (import/export) support to Node.js 6. Version 1.0.0 is the current stable release. It is designed as a lighter alternative to Babel, preserving source line numbers and symbol names. Project appears inactive with no recent updates.

error SyntaxError: Unexpected token import
cause Forgot to require('babbybel') before using import/export.
fix
Add require('babbybel') at the very top of your entry file.
deprecated Package is unmaintained and only supports Node.js 6.
fix Use a modern Node.js version and native ESM or Babel.
npm install babbybel
yarn add babbybel
pnpm add babbybel

Demonstrates requiring babbybel to enable ES module import/export syntax in Node.js 6.

// Install: npm install --save babbybel
// Then in your app entry point:
require('babbybel');

// Now you can use ES module syntax:
import myDefault from './my-module';
import { feature1, feature2 as renamed } from './other-module';
export default function myFunc() { return 'hello'; }
export const value = 42;