Browse Source

mark references from entry module export statements

declarations-and-references
Rich-Harris 9 years ago
parent
commit
2b4a2b4d8d
  1. 6
      src/Module.js

6
src/Module.js

@ -314,6 +314,12 @@ export default class Module {
}
this.statements.forEach( statement => {
// skip `export { foo, bar, baz }`...
if ( statement.node.type === 'ExportNamedDeclaration' && statement.node.specifiers.length ) {
// ...unless this is the entry module
if ( this !== this.bundle.entryModule ) return;
};
statement.references.forEach( reference => {
const declaration = reference.scope.findDeclaration( reference.name ) ||
this.trace( reference.name );

Loading…
Cancel
Save