Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-es2015-modules-amd

Package Overview
Dependencies
Maintainers
6
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-es2015-modules-amd

This plugin transforms ES2015 modules to AMD

  • 7.0.0-alpha.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5M
decreased by-14.5%
Maintainers
6
Weekly downloads
 
Created

What is babel-plugin-transform-es2015-modules-amd?

The babel-plugin-transform-es2015-modules-amd package is a Babel plugin that transforms ES2015 (ES6) module syntax into AMD (Asynchronous Module Definition) syntax. This is particularly useful for projects that need to support older module systems or integrate with legacy codebases that use AMD.

What are babel-plugin-transform-es2015-modules-amd's main functionalities?

Transform ES6 Import to AMD

This feature transforms ES6 import statements into AMD define calls. The code sample demonstrates how an ES6 import statement is converted to AMD syntax using the plugin.

const code = `import { example } from './example';`;
const output = babel.transform(code, { plugins: ['transform-es2015-modules-amd'] }).code;
console.log(output);

Transform ES6 Export to AMD

This feature transforms ES6 export statements into AMD define calls. The code sample shows how an ES6 export statement is converted to AMD syntax using the plugin.

const code = `export const example = 'example';`;
const output = babel.transform(code, { plugins: ['transform-es2015-modules-amd'] }).code;
console.log(output);

Other packages similar to babel-plugin-transform-es2015-modules-amd

Keywords

FAQs

Package last updated on 18 Apr 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc