<commit_before>---
layout: docs
title: ES2015 modules to AMD transform
description:
permalink: /docs/plugins/transform-es2015-modules-amd/
package: babel-plugin-transform-es2015-modules-amd
---

This plugin transforms ES2015 modules to AMD.

[Asynchronous Module Definition (AMD)](https://github.com/amdjs/amdjs-api)

## Installation

```sh
$ npm install babel-plugin-transform-es2015-modules-amd
```

## Usage<commit_msg>Update transform-es2015-modules-amd.md<commit_after>---
layout: docs
title: ES2015 modules to AMD transform
description:
permalink: /docs/plugins/transform-es2015-modules-amd/
package: babel-plugin-transform-es2015-modules-amd
---

This plugin transforms ES2015 modules to AMD.

[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
$ npm install babel-plugin-transform-es2015-modules-amd
```

## Usage
{'fraction_non_alphanumeric': 0.1509433962264151, 'fraction_numerical': 0.0431266846361186, 'mean_word_length': 4.742268041237113, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3303538', 'n_tokens_mistral': 410, 'n_tokens_neox': 351, 'n_words': 81}