Registry / serialization / requirejs-babel

requirejs-babel

JSON →
library0.0.9jsnpmunverified

An AMD loader plugin for RequireJS that transpiles ES6/ES2015 modules via Babel at build or runtime. Currently at version 0.0.9, this package bundles an outdated Babel 5.8.22 and has been unmaintained since 2015. It is superseded by native ES6 support in modern browsers and tools like Webpack/Rollup with Babel presets. Key differentiator: easy integration with legacy RequireJS projects needing ES6 module loading.

npm install requirejs-babel
INSTALL
IMPORT
SIG · REQUIREJS-BABEL
R
requirejs-babel
serializationjavascriptv0.0.9
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

es6! plugin
define(['es6!path/to/module'], function(mod) { ... })
require(['path/to/module'], ...) without 'es6!' prefix
The 'es6!' prefix is required to trigger transpilation.
babel config via requirejs config
requirejs.config({ paths: { es6: 'path/to/es6', babel: 'path/to/babel-5.8.22.min' } })
import { babel } from 'requirejs-babel'
No JavaScript import; configure paths in RequireJS config.
runtime transpilation
define(['es6!module'], function(m) { ... })
define(['module'], function(m) { ... }) where module is ES6
Without the 'es6!' prefix, the raw ES6 code will be passed to modern browsers that may not support it.

Shows how to configure RequireJS with the babel plugin and load an ES6 module using the 'es6!' prefix.

// index.html <script data-main="main" src="require.js"></script> // main.js requirejs.config({ paths: { es6: 'bower_components/requirejs-babel/es6', babel: 'bower_components/requirejs-babel/babel-5.8.22.min' } }); require(['es6!app'], function(app) { app.run(); }); // app.js (ES6) define(function() { 'use strict'; return { run: () => console.log('ES6 works!') }; });
Debug
Known issues
deprecatedRequireJS Babel is unmaintained. Babel 5 is outdated and incompatible with modern Babel versions (6+).
fix
Migrate to a modern bundler like Webpack or Rollup with @babel/preset-env.
affects: >=0
gotchaThe plugin includes Babel as a single-file minified bundle (babel-5.8.22.min). This is a very old version with limited ES2015 support.
fix
If you must use RequireJS, consider using a newer transpiler like TypeScript or a different plugin.
affects: >=0
gotchaAll modules loaded with 'es6!' are transpiled at runtime, which can slow down initial page load significantly.
fix
Use the RequireJS optimizer (r.js) to pre-transpile modules in production.
affects: >=0
breakingBabel 5 uses 'blacklist' and 'whitelist' options instead of 'presets'. Configuring via modern Babel options will not work.
fix
Set options via requirejs.babel config object with Babel 5 API: { blacklist: ['regenerator'], optional: ['asyncToGenerator'] }.
affects: >=0
Errors
Common errors & fixes
Error: Load timeout for modules: es6!app
The 'es6' path in requirejs.config is incorrect or the plugin file is missing.
fix
Ensure paths.es6 points to the directory containing es6.js, and paths.babel points to the babel bundle.
Uncaught Error: Module name 'babel' has not been loaded yet for context: _
The 'babel' dependency path is misconfigured or the bundle is missing.
fix
Check that paths.babel points to the correct babel-5.8.22.min.js file (without .js extension in config).
define is not defined
RequireJS is not loaded before calling define.
fix
Add <script src='require.js' data-main='main'></script> to HTML before any define calls.
Upgrade
Version history
0.0.9latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Resources
requirejs-babel — npm install requirejs-babel · libregistry