Browse Source

fix default exports

declarations-and-references
Rich-Harris 9 years ago
parent
commit
69a8570d58
  1. 2
      src/finalisers/shared/getExportBlock.js

2
src/finalisers/shared/getExportBlock.js

@ -1,6 +1,6 @@
export default function getExportBlock ( bundle, exportMode, mechanism = 'return' ) {
if ( exportMode === 'default' ) {
return `${mechanism} ${bundle.entryModule.defaultName()};`;
return `${mechanism} ${bundle.entryModule.declarations.default.render( false )};`;
}
return bundle.toExport

Loading…
Cancel
Save