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