Browse Source

handle re-exports in entry module

contingency-plan
Rich-Harris 9 years ago
parent
commit
840d1dc21d
  1. 30
      src/Statement.js

30
src/Statement.js

@ -263,21 +263,21 @@ export default class Statement {
this.isIncluded = true; this.isIncluded = true;
// `export { name } from './other'` is a special case // `export { name } from './other'` is a special case
// if ( this.isReexportDeclaration ) { if ( this.isReexportDeclaration ) {
// return this.module.bundle.fetchModule( this.node.source.value, this.module.id ) const id = this.module.resolvedIds[ this.node.source.value ];
// .then( otherModule => { const otherModule = this.module.bundle.moduleById[ id ];
// return sequence( this.node.specifiers, specifier => {
// const reexport = this.module.reexports[ specifier.exported.name ]; this.node.specifiers.forEach( specifier => {
// const reexport = this.module.reexports[ specifier.exported.name ];
// reexport.isUsed = true;
// reexport.module = otherModule; reexport.isUsed = true;
// reexport.module = otherModule; // TODO still necessary?
// return otherModule.isExternal ?
// null : if ( !otherModule.isExternal ) otherModule.markExport( specifier.local.name, specifier.exported.name, this.module );
// otherModule.markExport( specifier.local.name, specifier.exported.name, this.module ); });
// });
// }); return;
// } }
Object.keys( this.dependsOn ).forEach( name => { Object.keys( this.dependsOn ).forEach( name => {
if ( this.defines[ name ] ) return; // TODO maybe exclude from `this.dependsOn` in the first place? if ( this.defines[ name ] ) return; // TODO maybe exclude from `this.dependsOn` in the first place?

Loading…
Cancel
Save