Skip to content

Commit b812a2a

Browse files
committed
Updated README
1 parent 5693bd2 commit b812a2a

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Node 6 supports almost whole ES 6 specification but there is not support for ES6 imports :/
44

5-
This plugin transforms your ES6 imports to commonjs counterparts.
5+
This plugin transforms your ES6 *imports / exports to commonjs* counterparts.
66
**NO BABEL, No sourcemapping is needed**.
77

88
**The output is in ES6**.
@@ -14,10 +14,21 @@ EXAMPLE:
1414
```js
1515
import Foo, { Foo1 } from 'Bar';
1616

17-
to
17+
export function m() {}
18+
export const n();
19+
export default function () {}
20+
21+
// to
1822

1923
const Foo = require('Bar').default;
2024
const { Foo1 } = require('Bar');
25+
26+
function m() {}
27+
const n;
28+
function defaultFunction() {}
29+
30+
exports.m = m;
31+
exports.default = defaultFunction;
2132
```
2233

2334
# How to use

0 commit comments

Comments
 (0)