From 607ba5ce0c509f006776b770325a0d0e50de2a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Segersv=C3=A4rd?= Date: Thu, 3 Dec 2015 13:27:50 +0100 Subject: [PATCH] Fix default-export-2 and default-export-3 --- src/finalisers/es6.js | 2 +- src/finalisers/shared/getExportBlock.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/finalisers/es6.js b/src/finalisers/es6.js index f64f978..149166c 100644 --- a/src/finalisers/es6.js +++ b/src/finalisers/es6.js @@ -47,7 +47,7 @@ export default function es6 ( bundle, magicString ) { const defaultExport = module.exports.default || module.reexports.default; if ( defaultExport ) { - exportBlock += `export default ${module.traceExport( 'default' ).name};`; + exportBlock += `export default ${module.traceExport( 'default' ).render( true )};`; } if ( exportBlock ) { diff --git a/src/finalisers/shared/getExportBlock.js b/src/finalisers/shared/getExportBlock.js index a6de6af..972da59 100644 --- a/src/finalisers/shared/getExportBlock.js +++ b/src/finalisers/shared/getExportBlock.js @@ -1,6 +1,6 @@ export default function getExportBlock ( entryModule, exportMode, mechanism = 'return' ) { if ( exportMode === 'default' ) { - return `${mechanism} ${entryModule.declarations.default.render( false )};`; + return `${mechanism} ${entryModule.traceExport( 'default' ).render( false )};`; } return entryModule.getExports()