New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-modules-amd

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-modules-amd

es2015 module tranformer for amd

1.0.1
latest
Source
npm
Version published
Weekly downloads
7
16.67%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-transform-modules-amd

es2015 module tranformer for amd.

Difference

because of the difference between es2015 module and amd module, this plugin don't support named export and default export at the same time.

  • import * as foo from 'foo' and import foo from 'foo' are equal
  • export foo; export default foo; will throw: 'amd module don't support export default foo and , export foo both, please choose one

Installation

$ npm install babel-plugin-transform-modules-amd --save-dev

Usage

.babelrc

{
  "plugins": ["transform-modules-amd"]
}

Via CLI

$ babel --plugins transform-modules-amd script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-modules-amd"]
});

Keywords

babel-plugin

FAQs

Package last updated on 14 Apr 2016

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