Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@babel/plugin-transform-modules-amd
Advanced tools
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.17.12 (2022-05-16)
babel-plugin-transform-react-constant-elements
babel-generator
babel-plugin-transform-destructuring
babel-parser
babel-parser
, babel-plugin-transform-destructuring
, babel-types
babel-plugin-proposal-decorators
, babel-types
babel-core
babel-core
, babel-generator
, babel-helper-create-class-features-plugin
, babel-helper-create-regexp-features-plugin
, babel-helper-module-transforms
, babel-helper-plugin-utils
, babel-parser
, babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression
, babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining
, babel-plugin-external-helpers
, babel-plugin-proposal-async-do-expressions
, babel-plugin-proposal-async-generator-functions
, babel-plugin-proposal-class-properties
, babel-plugin-proposal-class-static-block
, babel-plugin-proposal-decorators
, babel-plugin-proposal-export-default-from
, babel-plugin-proposal-export-namespace-from
, babel-plugin-proposal-function-sent
, babel-plugin-proposal-json-strings
, babel-plugin-proposal-logical-assignment-operators
, babel-plugin-proposal-nullish-coalescing-operator
, babel-plugin-proposal-object-rest-spread
, babel-plugin-proposal-optional-chaining
, babel-plugin-proposal-partial-application
, babel-plugin-proposal-pipeline-operator
, babel-plugin-proposal-private-methods
, babel-plugin-proposal-private-property-in-object
, babel-plugin-proposal-record-and-tuple
, babel-plugin-proposal-unicode-property-regex
, babel-plugin-syntax-decorators
, babel-plugin-syntax-destructuring-private
, babel-plugin-syntax-flow
, babel-plugin-syntax-import-assertions
, babel-plugin-syntax-pipeline-operator
, babel-plugin-syntax-record-and-tuple
, babel-plugin-syntax-typescript
, babel-plugin-transform-arrow-functions
, babel-plugin-transform-async-to-generator
, babel-plugin-transform-block-scoping
, babel-plugin-transform-classes
, babel-plugin-transform-computed-properties
, babel-plugin-transform-destructuring
, babel-plugin-transform-duplicate-keys
, babel-plugin-transform-flow-comments
, babel-plugin-transform-flow-strip-types
, babel-plugin-transform-for-of
, babel-plugin-transform-instanceof
, babel-plugin-transform-jscript
, babel-plugin-transform-literals
, babel-plugin-transform-modules-amd
, babel-plugin-transform-modules-commonjs
, babel-plugin-transform-modules-systemjs
, babel-plugin-transform-modules-umd
, babel-plugin-transform-named-capturing-groups-regex
, babel-plugin-transform-new-target
, babel-plugin-transform-parameters
, babel-plugin-transform-property-mutators
, babel-plugin-transform-proto-to-assign
, babel-plugin-transform-react-constant-elements
, babel-plugin-transform-react-jsx
, babel-plugin-transform-reserved-words
, babel-plugin-transform-runtime
, babel-plugin-transform-spread
, babel-plugin-transform-template-literals
, babel-plugin-transform-typeof-symbol
, babel-plugin-transform-typescript
, babel-preset-env
, babel-preset-flow
, babel-preset-react
, babel-preset-typescript
, babel-traverse
, babel-types
FAQs
This plugin transforms ES2015 modules to AMD
The npm package @babel/plugin-transform-modules-amd receives a total of 4,453,100 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.