Fix treeshaking, not all export clauses should be kept

This commit is contained in:
Alex Dima
2020-03-05 10:21:36 +01:00
parent 74b9e5bfda
commit 68351085db
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -265,7 +265,8 @@ function markNodes(languageService, options) {
return;
}
if (ts.isExportDeclaration(node)) {
if (node.moduleSpecifier && ts.isStringLiteral(node.moduleSpecifier)) {
if (!node.exportClause && node.moduleSpecifier && ts.isStringLiteral(node.moduleSpecifier)) {
// export * from "foo";
setColor(node, 2 /* Black */);
enqueueImport(node, node.moduleSpecifier.text);
}