Skip to content

Commit

Permalink
Support string specifier name in export-ns-from
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Sep 22, 2020
1 parent a4ce504 commit bd69ecd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Expand Up @@ -27,7 +27,9 @@ export default declare(api => {

const specifier = specifiers.shift();
const { exported } = specifier;
const uid = scope.generateUidIdentifier(exported.name);
const uid = scope.generateUidIdentifier(
exported.name ?? exported.value,
);

nodes.push(
t.importDeclaration(
Expand Down
@@ -0,0 +1 @@
export * as "some exports" from "foo";
@@ -0,0 +1,2 @@
import * as _someExports from "foo";
export { _someExports as "some exports" };

0 comments on commit bd69ecd

Please sign in to comment.