Skip to content

Commit

Permalink
fix: register injected importDeclaration (#10172)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung authored and existentialism committed Jul 6, 2019
1 parent c777e81 commit 075a502
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 2 deletions.
Expand Up @@ -33,7 +33,8 @@ export default declare(api => {
nodes.push(node);
}

path.replaceWithMultiple(nodes);
const [importDeclaration] = path.replaceWithMultiple(nodes);
path.scope.registerDeclaration(importDeclaration);
},
},
};
Expand Down
@@ -0,0 +1 @@
export foo from "bar";
@@ -0,0 +1,3 @@
{
"plugins": ["proposal-export-default-from", "transform-typescript"]
}
@@ -0,0 +1,2 @@
import _foo from "bar";
export { _foo as foo };
Expand Up @@ -43,7 +43,8 @@ export default declare(api => {
nodes.push(node);
}

path.replaceWithMultiple(nodes);
const [importDeclaration] = path.replaceWithMultiple(nodes);
path.scope.registerDeclaration(importDeclaration);
},
},
};
Expand Down
@@ -0,0 +1 @@
export * as foo from "bar";
@@ -0,0 +1,3 @@
{
"plugins": ["proposal-export-namespace-from", "transform-typescript"]
}
@@ -0,0 +1,2 @@
import * as _foo from "bar";
export { _foo as foo };

0 comments on commit 075a502

Please sign in to comment.