diff --git a/src/Module.js b/src/Module.js index a32c021..2123103 100644 --- a/src/Module.js +++ b/src/Module.js @@ -288,7 +288,7 @@ export default class Module { // bind the name to the other module's reference. this.allExportsFrom.forEach( module => { module.exports.getNames().forEach( name => { - if ( !this.exports.defines( name ) ) { + if ( name !== 'default' && !this.exports.defines( name ) ) { this.exports.bind( name, module.exports.reference( name ) ); } }); diff --git a/test/form/export-all-from-internal/_expected/amd.js b/test/form/export-all-from-internal/_expected/amd.js index 89f5652..6b0c47e 100644 --- a/test/form/export-all-from-internal/_expected/amd.js +++ b/test/form/export-all-from-internal/_expected/amd.js @@ -2,10 +2,8 @@ define(['exports'], function (exports) { 'use strict'; const a = 1; const b = 2; - var internal = 42; exports.a = a; exports.b = b; - exports['default'] = internal; }); diff --git a/test/form/export-all-from-internal/_expected/cjs.js b/test/form/export-all-from-internal/_expected/cjs.js index cadb160..869bba0 100644 --- a/test/form/export-all-from-internal/_expected/cjs.js +++ b/test/form/export-all-from-internal/_expected/cjs.js @@ -2,8 +2,6 @@ const a = 1; const b = 2; -var internal = 42; exports.a = a; exports.b = b; -exports['default'] = internal; diff --git a/test/form/export-all-from-internal/_expected/es6.js b/test/form/export-all-from-internal/_expected/es6.js index d68e7f9..aafcac6 100644 --- a/test/form/export-all-from-internal/_expected/es6.js +++ b/test/form/export-all-from-internal/_expected/es6.js @@ -1,6 +1,4 @@ const a = 1; const b = 2; -var internal = 42; export { a, b }; -export default internal; diff --git a/test/form/export-all-from-internal/_expected/iife.js b/test/form/export-all-from-internal/_expected/iife.js index c093623..238e208 100644 --- a/test/form/export-all-from-internal/_expected/iife.js +++ b/test/form/export-all-from-internal/_expected/iife.js @@ -2,10 +2,8 @@ const a = 1; const b = 2; - var internal = 42; exports.a = a; exports.b = b; - exports['default'] = internal; })((this.exposedInternals = {})); diff --git a/test/form/export-all-from-internal/_expected/umd.js b/test/form/export-all-from-internal/_expected/umd.js index 45a93fa..50c5cc4 100644 --- a/test/form/export-all-from-internal/_expected/umd.js +++ b/test/form/export-all-from-internal/_expected/umd.js @@ -6,10 +6,8 @@ const a = 1; const b = 2; - var internal = 42; exports.a = a; exports.b = b; - exports['default'] = internal; }));