Update transform-es2015 READMEs from babel.github.io [skip ci] (#4926)
Signed-off-by: Brian Ng <bng412@gmail.com>
This commit is contained in:
@@ -1,5 +1,29 @@
|
||||
# babel-plugin-transform-es2015-modules-amd
|
||||
|
||||
> This plugin transforms ES2015 modules to [Asynchronous Module Definition (AMD)](https://github.com/amdjs/amdjs-api).
|
||||
|
||||
## Example
|
||||
|
||||
**In**
|
||||
|
||||
```javascript
|
||||
export default 42;
|
||||
```
|
||||
|
||||
**Out**
|
||||
|
||||
```javascript
|
||||
define(["exports"], function (exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = 42;
|
||||
});
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user