An open API service indexing awesome lists of open source software.

https://github.com/jonmbake/babel-plugin-transform-es2015-modules-requirejs

Babel plugin to transform ES2015 modules to AMD using RequireJS's common JS wrapper.
https://github.com/jonmbake/babel-plugin-transform-es2015-modules-requirejs

Last synced: 12 months ago
JSON representation

Babel plugin to transform ES2015 modules to AMD using RequireJS's common JS wrapper.

Awesome Lists containing this project

README

          

# babel-plugin-transform-es2015-modules-requirejs

A [Babel](https://github.com/babel/babel) plugin to transform ES2015 modules to AMD using [RequireJS's common JS wrapper](http://requirejs.org/docs/commonjs.html#manualconversion).

```
export var foo = 1;
```

is transformed to:

```
define(function (require, exports, module) {
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
var foo = exports.foo = 1;
});
```