-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for named export list (#3)
* add support for named exports in curly braces e.g. export { foo }; * allow named exports to coexist with default exports * add "default" named export to CJS * Revert "add "default" named export to CJS" This reverts commit 31ae209 * add tests
- Loading branch information
Showing
5 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"cjs": "dist/curly-named.js", | ||
"esm": "dist/curly-named.mjs", | ||
"umd": "dist/curly-named.min.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "named-exports", | ||
"unpkg": "dist/curly-named.min.js", | ||
"module": "dist/curly-named.mjs", | ||
"main": "dist/curly-named.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
function foo(a) { | ||
return a + a; | ||
} | ||
|
||
const bar = b => b + b; | ||
|
||
async function baz(a) { | ||
return a + a; | ||
} | ||
|
||
let hello = 'world'; | ||
|
||
var abc = 123; | ||
|
||
class Foo extends Component { | ||
// | ||
} | ||
|
||
export { foo, bar, baz, hello, abc, Foo }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters