UNPKG

788 BMarkdownView Raw
1# babel-plugin-transform-export-default
2
3> Compile export-default-from statements to ES2015
4
5## Example
6
7```js
8export v from 'mod';
9```
10
11## Installation
12
13```sh
14npm install --save-dev babel-plugin-transform-export-default
15```
16
17## Usage
18
19### Via `.babelrc` (Recommended)
20
21**.babelrc**
22
23```json
24{
25 "plugins": ["transform-export-default"]
26}
27```
28
29### Via CLI
30
31```sh
32babel --plugins transform-export-default script.js
33```
34
35### Via Node API
36
37```javascript
38require("babel-core").transform("code", {
39 plugins: ["transform-export-default"]
40});
41```
42## References
43
44* ~~[Proposal: Additional export-from statements in ES7](https://github.com/leebyron/ecmascript-more-export-from)~~ (Withdrawn)
45* [ECMAScript Proposal: export default from](https://github.com/leebyron/ecmascript-export-default-from)