Registry / serialization / babel-runtime-amd

babel-runtime-amd

JSON →
library1.1.4jsnpmunverified

AMD version of babel-runtime (v1.1.4, last updated 2016). Provides AMD modules of babel-runtime, core-js, regenerator-runtime, and babel-polyfill for use in AMD environments like RequireJS. Includes a pre-built bundle (bundle.min.js) for easy inclusion. Enables Babel's transform-runtime plugin in browser-based AMD setups. Low maintenance, no recent updates, intended for legacy projects.

npm install babel-runtime-amd
INSTALL
IMPORT
SIG · BABEL-RUNTIME-AMD
B
babel-runtime-amd
serializationjavascriptv1.1.4
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.

babel-runtime
require(['babel-runtime'], function(runtime) { ... })
var runtime = require('babel-runtime');
AMD environment: use RequireJS async require, not CommonJS style.
core-js
require(['core-js'], function(core) { ... })
import 'core-js'
AMD module: use require or define, not ES6 import.
regenerator-runtime
require(['regenerator-runtime'], function(generator) { ... })
const regeneratorRuntime = require('regenerator-runtime');
AMD context: use array dependency in require.
babel-polyfill
require(['babel-polyfill'])
import 'babel-polyfill'
No return value; side-effect only. Must be loaded before your code.

Configure RequireJS paths and import a specific babel-runtime helper AMD module.

// 1. Install: npm install babel-runtime-amd --save-dev // 2. In your RequireJS config, add paths: requirejs.config({ paths: { 'babel-runtime': 'node_modules/babel-runtime-amd/babel-runtime', 'core-js': 'node_modules/babel-runtime-amd/core-js', 'regenerator-runtime': 'node_modules/babel-runtime-amd/regenerator-runtime' } }); // 3. Use in your module: define(['babel-runtime/helpers/classCallCheck'], function(classCallCheck) { function MyClass() { classCallCheck(this, MyClass); } return MyClass; });
Debug
Known issues
deprecatedPackage is based on outdated babel-runtime v6 and babel-plugin-transform-runtime. Modern Babel (v7+) uses @babel/runtime and @babel/plugin-transform-runtime.
fix
Use @babel/runtime and @babel/plugin-transform-runtime for current Babel versions.
affects: all
gotchaThe pre-built bundle.js is large (>1MB) and may not be tree-shaken. For optimal performance, prefer individual modules.
fix
Use the per-module approach with paths and exclude from bundle, or only include needed helpers.
affects: all
gotchaPackage has not been updated since 2016. No support for newer JavaScript features or Babel versions.
fix
Consider using alternative AMD-friendly runtime polyfills like core-js-bundle.
affects: all
gotchaThe bundle.min.js includes all helpers unconditionally; may conflict with other AMD modules if not properly excluded.
fix
Add excludeShallow configuration to opt out of bundling duplicate helpers.
affects: all
Errors
Common errors & fixes
Module name 'babel-runtime' has not been loaded yet for context: use require([])
Using synchronous require instead of AMD async require.
fix
Use require(['babel-runtime'], function(runtime) { ... }) instead of var runtime = require('babel-runtime');
Error: Mismatched anonymous define() module: function (...) { ... }
Multiple anonymous define calls, possibly from bundle and individual modules.
fix
Ensure you either use the pre-built bundle OR individual modules, not both. If using bundle, exclude other babel-runtime paths.
ReferenceError: regeneratorRuntime is not defined
regenerator-runtime not loaded before using generators/async.
fix
Require ['regenerator-runtime'] before using generator functions, or use the bundle that includes it.
Upgrade
Version history
1.1.4latest on npm
Audit
Dependencies
babel-runtimerequiredProvides the original babel-runtime helpers converted to AMD
core-jsrequiredIncluded as AMD module for polyfills
regenerator-runtimerequiredIncluded as AMD module for async/await support
Agent activity
21 hits · last 30 days
node
18
Amazon
1
OpenAI (training)
1
Resources
babel-runtime-amd — npm install babel-runtime-amd · libregistry