Browse Source

simplify export block logic

contingency-plan
Rich Harris 9 years ago
parent
commit
199d3ad4e4
  1. 5
      src/finalisers/shared/getExportBlock.js

5
src/finalisers/shared/getExportBlock.js

@ -11,10 +11,7 @@ export default function getExportBlock ( bundle, exportMode, mechanism = 'return
return bundle.toExport
.map( name => {
const prop = name === 'default' ? `['default']` : `.${name}`;
const reexport = bundle.entryModule.reexports[ name ];
name = reexport ?
bundle.traceExport( bundle.entryModule, name ) :
bundle.trace( bundle.entryModule, name );
name = bundle.traceExport( bundle.entryModule, name );
return `exports${prop} = ${name};`;
})
.join( '\n' );

Loading…
Cancel
Save