{"id":20515,"library":"requirejs-babel","title":"RequireJS Babel plugin","description":"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.","status":"abandoned","version":"0.0.9","language":"javascript","source_language":"en","source_url":"https://github.com/mikach/requirejs-babel","tags":["javascript"],"install":[{"cmd":"npm install requirejs-babel","lang":"bash","label":"npm"},{"cmd":"yarn add requirejs-babel","lang":"bash","label":"yarn"},{"cmd":"pnpm add requirejs-babel","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The 'es6!' prefix is required to trigger transpilation.","wrong":"require(['path/to/module'], ...) without 'es6!' prefix","symbol":"es6! plugin","correct":"define(['es6!path/to/module'], function(mod) { ... })"},{"note":"No JavaScript import; configure paths in RequireJS config.","wrong":"import { babel } from 'requirejs-babel'","symbol":"babel config via requirejs config","correct":"requirejs.config({ paths: { es6: 'path/to/es6', babel: 'path/to/babel-5.8.22.min' } })"},{"note":"Without the 'es6!' prefix, the raw ES6 code will be passed to modern browsers that may not support it.","wrong":"define(['module'], function(m) { ... }) where module is ES6","symbol":"runtime transpilation","correct":"define(['es6!module'], function(m) { ... })"}],"quickstart":{"code":"// index.html\n<script data-main=\"main\" src=\"require.js\"></script>\n// main.js\nrequirejs.config({\n  paths: {\n    es6: 'bower_components/requirejs-babel/es6',\n    babel: 'bower_components/requirejs-babel/babel-5.8.22.min'\n  }\n});\nrequire(['es6!app'], function(app) { app.run(); });\n// app.js (ES6)\ndefine(function() {\n  'use strict';\n  return { run: () => console.log('ES6 works!') };\n});","lang":"javascript","description":"Shows how to configure RequireJS with the babel plugin and load an ES6 module using the 'es6!' prefix."},"warnings":[{"fix":"Migrate to a modern bundler like Webpack or Rollup with @babel/preset-env.","message":"RequireJS Babel is unmaintained. Babel 5 is outdated and incompatible with modern Babel versions (6+).","severity":"deprecated","affected_versions":">=0"},{"fix":"If you must use RequireJS, consider using a newer transpiler like TypeScript or a different plugin.","message":"The plugin includes Babel as a single-file minified bundle (babel-5.8.22.min). This is a very old version with limited ES2015 support.","severity":"gotcha","affected_versions":">=0"},{"fix":"Use the RequireJS optimizer (r.js) to pre-transpile modules in production.","message":"All modules loaded with 'es6!' are transpiled at runtime, which can slow down initial page load significantly.","severity":"gotcha","affected_versions":">=0"},{"fix":"Set options via requirejs.babel config object with Babel 5 API: { blacklist: ['regenerator'], optional: ['asyncToGenerator'] }.","message":"Babel 5 uses 'blacklist' and 'whitelist' options instead of 'presets'. Configuring via modern Babel options will not work.","severity":"breaking","affected_versions":">=0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Ensure paths.es6 points to the directory containing es6.js, and paths.babel points to the babel bundle.","cause":"The 'es6' path in requirejs.config is incorrect or the plugin file is missing.","error":"Error: Load timeout for modules: es6!app"},{"fix":"Check that paths.babel points to the correct babel-5.8.22.min.js file (without .js extension in config).","cause":"The 'babel' dependency path is misconfigured or the bundle is missing.","error":"Uncaught Error: Module name 'babel' has not been loaded yet for context: _"},{"fix":"Add <script src='require.js' data-main='main'></script> to HTML before any define calls.","cause":"RequireJS is not loaded before calling define.","error":"define is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}