GitXplorerGitXplorer
G

babel-plugin-transform-modules-amd

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
036a1f356b4db1d164699005347e42c3c8b581b2

Get fixed babel amd transform plugin.

GGlobegitter committed 7 years ago
Verified
f03765ebb82094653ecb57f5e94b481a9535dcaf

Initial commit

GGlobegitter committed 7 years ago

README

The README file for this repository.

@babel/plugin-transform-modules-amd

This plugin transforms ES2015 modules to Asynchronous Module Definition (AMD).

Example

In

export default 42;

Out

define(["exports"], function (exports) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  exports.default = 42;
});

Installation

npm install --save-dev @babel/plugin-transform-modules-amd

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["@babel/plugin-transform-modules-amd"]
}

Via CLI

babel --plugins @babel/plugin-transform-modules-amd script.js

Via Node API

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

Options

See options for @babel/plugin-transform-modules-commonjs.