Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gerard2perez/babel-plugin-transform-koaton-es6-modules
https://github.com/gerard2perez/babel-plugin-transform-koaton-es6-modules
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/gerard2perez/babel-plugin-transform-koaton-es6-modules
- Owner: gerard2perez
- Created: 2017-01-16T16:50:37.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-16T17:00:27.000Z (almost 8 years ago)
- Last Synced: 2024-10-28T14:04:37.997Z (2 months ago)
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# babel-plugin-transform-es2015-modules-commonjs
## Installation
```sh
$ npm install babel-plugin-transform-es2015-modules-commonjs
```## Usage
### Via `.babelrc` (Recommended)
**.babelrc**
```js
// without options
{
"plugins": ["transform-es2015-modules-commonjs"]
}// with options
{
"plugins": [
["transform-es2015-modules-commonjs", {
"allowTopLevelThis": true
}]
]
}
```### Via CLI
```sh
$ babel --plugins transform-es2015-modules-commonjs script.js
```### Via Node API
```javascript
require("babel-core").transform("code", {
plugins: ["transform-es2015-modules-commonjs"]
});
```