
Security News
AI Slop Is Polluting Bug Bounty Platforms with Fake Vulnerability Reports
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.
@babel/plugin-transform-modules-amd
Advanced tools
This plugin transforms ES2015 modules to AMD
The @babel/plugin-transform-modules-amd package is a plugin for Babel, a JavaScript compiler, that transforms ES2015+ modules to Asynchronous Module Definition (AMD) format. This is particularly useful for integrating modern JavaScript codebases with systems that require or benefit from the AMD module pattern, such as certain web browsers and JavaScript environments.
Transform ES Modules to AMD
This feature automatically converts ES2015+ import statements into AMD `define` calls, making it easier to integrate with AMD-based module systems.
import { sum } from './math';
console.log(sum(1, 2));
// Transforms to:
define(['./math'], function (_math) {
console.log(_math.sum(1, 2));
});
Dynamic Import Support
Supports the transformation of dynamic `import()` syntax to AMD's `require` calls, enabling code splitting and lazy loading of modules in AMD environments.
import('./math').then(math => {
console.log(math.sum(1, 2));
});
// Transforms to:
require(['./math'], function (math) {
console.log(math.sum(1, 2));
});
This package transforms ES2015+ modules to CommonJS modules, similar to how @babel/plugin-transform-modules-amd transforms modules to AMD format. It's useful for environments that support CommonJS modules, offering an alternative module system transformation.
Similar to the AMD plugin, this Babel plugin transforms ES2015+ modules to Universal Module Definition (UMD) format. UMD modules are compatible with both CommonJS and AMD environments, making this plugin a versatile choice for projects that need to support multiple module systems.
This plugin transforms ES2015+ modules to SystemJS format, another module loader system that can be used in the browser. It's an alternative to AMD for developers looking for dynamic loading and other advanced module loading features in the browser.
This plugin transforms ES2015 modules to AMD
See our website @babel/plugin-transform-modules-amd for more information.
Using npm:
npm install --save-dev @babel/plugin-transform-modules-amd
or using yarn:
yarn add @babel/plugin-transform-modules-amd --dev
v7.27.1 (2025-04-30)
babel-parser
babel-parser
, babel-types
babel-plugin-proposal-destructuring-private
, babel-plugin-proposal-do-expressions
, babel-traverse
babel-helper-wrap-function
, babel-plugin-transform-async-to-generator
babel-helper-remap-async-to-generator
, babel-plugin-transform-async-to-generator
babel-helper-fixtures
, babel-parser
babel-generator
, babel-parser
babel-parser
babel-compat-data
, babel-preset-env
babel-traverse
babel-generator
babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining
, babel-plugin-proposal-decorators
, babel-plugin-transform-arrow-functions
, babel-plugin-transform-class-properties
, babel-plugin-transform-destructuring
, babel-plugin-transform-object-rest-spread
, babel-plugin-transform-optional-chaining
, babel-plugin-transform-parameters
, babel-traverse
babel-runtime-corejs2
, babel-runtime-corejs3
, babel-runtime
regenerator-runtime
dep in @babel/runtime
(@nicolo-ribaudo)babel-compat-data
, babel-preset-env
babel-compat-data
, babel-standalone
babel-register
@babel/register
to cts (@liuxingbaoyu)babel-cli
, babel-compat-data
, babel-core
, babel-generator
, babel-helper-compilation-targets
, babel-helper-fixtures
, babel-helper-module-imports
, babel-helper-module-transforms
, babel-helper-plugin-test-runner
, babel-helper-transform-fixture-test-runner
, babel-helpers
, babel-node
, babel-parser
, babel-plugin-transform-modules-amd
, babel-plugin-transform-modules-commonjs
, babel-plugin-transform-modules-systemjs
, babel-plugin-transform-modules-umd
, babel-plugin-transform-react-display-name
, babel-plugin-transform-regenerator
, babel-plugin-transform-runtime
, babel-plugin-transform-typeof-symbol
, babel-plugin-transform-typescript
, babel-preset-env
, babel-register
, babel-standalone
, babel-types
babel-plugin-transform-regenerator
babel-helpers
, babel-plugin-transform-async-generator-functions
, babel-plugin-transform-regenerator
, babel-preset-env
, babel-runtime-corejs3
babel-helpers
, babel-plugin-transform-regenerator
babel-helpers
babel-helpers
, babel-plugin-transform-modules-commonjs
, babel-runtime-corejs3
interopRequireWildcard
size (@liuxingbaoyu)babel-helpers
, babel-plugin-transform-async-generator-functions
, babel-plugin-transform-regenerator
, babel-preset-env
, babel-runtime-corejs3
regeneratorRuntime
size (@liuxingbaoyu)FAQs
This plugin transforms ES2015 modules to AMD
The npm package @babel/plugin-transform-modules-amd receives a total of 21,823,009 weekly downloads. As such, @babel/plugin-transform-modules-amd popularity was classified as popular.
We found that @babel/plugin-transform-modules-amd demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.
Research
Security News
The Socket Research team investigates a malicious Python package disguised as a Discord error logger that executes remote commands and exfiltrates data via a covert C2 channel.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.