babel-plugin-transform-es2015-modules-amd-if-required

Transforms ES2015 modules to AMD define statements if they aren't already AMD modules

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
babel-plugin-transform-es2015-modules-amd-if-required
001.0.47 years ago7 years agoMinified + gzip package size for babel-plugin-transform-es2015-modules-amd-if-required in KB

Readme

babel-plugin-transform-es2015-modules-amd-if-required
Build Status Coverage Status
Transforms ES2015 modules to AMD modules, only if they aren't already AMD modules or require configs.

Installation

$ npm install babel-plugin-transform-es2015-modules-amd-if-required

Usage

Via .babelrc (Recommended)

.babelrc
{
  "plugins": ["transform-es2015-modules-amd-if-required"]
}

Via CLI

$ babel --plugins transform-es2015-modules-amd-if-required script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-es2015-modules-amd-if-required"]
});
License
See LICENSE.md