Skip to content
This repository was archived by the owner on Dec 4, 2022. It is now read-only.

Commit 3d81457

Browse files
author
David First
committed
support link-files with "export { default as ... }"; syntax
1 parent 5e3fd26 commit 3d81457

File tree

1 file changed

+9
-0
lines changed
  • src/dependency-builder/detectives/detective-es6

1 file changed

+9
-0
lines changed

src/dependency-builder/detectives/detective-es6/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ module.exports = function(src, options) {
4242
case 'ExportAllDeclaration':
4343
if (node.source && node.source.value) {
4444
dependencies.push(node.source.value);
45+
node.specifiers.forEach((specifier) => {
46+
var specifierValue = {
47+
isDefault: specifier.local.name === 'default', // e.g. export { default as isArray } from './is-array';
48+
name: specifier.exported.name
49+
};
50+
importSpecifiers[node.source.value]
51+
? importSpecifiers[node.source.value].push(specifierValue)
52+
: importSpecifiers[node.source.value] = [specifierValue];
53+
});
4554
}
4655
break;
4756
case 'CallExpression':

0 commit comments

Comments
 (0)