{"id":19361,"library":"babel-runtime-amd","title":"babel-runtime-amd","description":"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.","status":"maintenance","version":"1.1.4","language":"javascript","source_language":"en","source_url":"https://github.com/bennieswart/babel-runtime-amd","tags":["javascript","babel-runtime","reqiurejs","amd"],"install":[{"cmd":"npm install babel-runtime-amd","lang":"bash","label":"npm"},{"cmd":"yarn add babel-runtime-amd","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-runtime-amd","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides the original babel-runtime helpers converted to AMD","package":"babel-runtime","optional":false},{"reason":"Included as AMD module for polyfills","package":"core-js","optional":false},{"reason":"Included as AMD module for async/await support","package":"regenerator-runtime","optional":false}],"imports":[{"note":"AMD environment: use RequireJS async require, not CommonJS style.","wrong":"var runtime = require('babel-runtime');","symbol":"babel-runtime","correct":"require(['babel-runtime'], function(runtime) { ... })"},{"note":"AMD module: use require or define, not ES6 import.","wrong":"import 'core-js'","symbol":"core-js","correct":"require(['core-js'], function(core) { ... })"},{"note":"AMD context: use array dependency in require.","wrong":"const regeneratorRuntime = require('regenerator-runtime');","symbol":"regenerator-runtime","correct":"require(['regenerator-runtime'], function(generator) { ... })"},{"note":"No return value; side-effect only. Must be loaded before your code.","wrong":"import 'babel-polyfill'","symbol":"babel-polyfill","correct":"require(['babel-polyfill'])"}],"quickstart":{"code":"// 1. Install: npm install babel-runtime-amd --save-dev\n// 2. In your RequireJS config, add paths:\nrequirejs.config({\n    paths: {\n        'babel-runtime': 'node_modules/babel-runtime-amd/babel-runtime',\n        'core-js': 'node_modules/babel-runtime-amd/core-js',\n        'regenerator-runtime': 'node_modules/babel-runtime-amd/regenerator-runtime'\n    }\n});\n// 3. Use in your module:\ndefine(['babel-runtime/helpers/classCallCheck'], function(classCallCheck) {\n    function MyClass() {\n        classCallCheck(this, MyClass);\n    }\n    return MyClass;\n});","lang":"javascript","description":"Configure RequireJS paths and import a specific babel-runtime helper AMD module."},"warnings":[{"fix":"Use @babel/runtime and @babel/plugin-transform-runtime for current Babel versions.","message":"Package is based on outdated babel-runtime v6 and babel-plugin-transform-runtime. Modern Babel (v7+) uses @babel/runtime and @babel/plugin-transform-runtime.","severity":"deprecated","affected_versions":"all"},{"fix":"Use the per-module approach with paths and exclude from bundle, or only include needed helpers.","message":"The pre-built bundle.js is large (>1MB) and may not be tree-shaken. For optimal performance, prefer individual modules.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider using alternative AMD-friendly runtime polyfills like core-js-bundle.","message":"Package has not been updated since 2016. No support for newer JavaScript features or Babel versions.","severity":"gotcha","affected_versions":"all"},{"fix":"Add excludeShallow configuration to opt out of bundling duplicate helpers.","message":"The bundle.min.js includes all helpers unconditionally; may conflict with other AMD modules if not properly excluded.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use require(['babel-runtime'], function(runtime) { ... }) instead of var runtime = require('babel-runtime');","cause":"Using synchronous require instead of AMD async require.","error":"Module name 'babel-runtime' has not been loaded yet for context: use require([])"},{"fix":"Ensure you either use the pre-built bundle OR individual modules, not both. If using bundle, exclude other babel-runtime paths.","cause":"Multiple anonymous define calls, possibly from bundle and individual modules.","error":"Error: Mismatched anonymous define() module: function (...) { ... }"},{"fix":"Require ['regenerator-runtime'] before using generator functions, or use the bundle that includes it.","cause":"regenerator-runtime not loaded before using generators/async.","error":"ReferenceError: regeneratorRuntime is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}