Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #124 from ntilwalli/iifeParsingIssue
Browse files Browse the repository at this point in the history
Add failing test for default export IIFE
  • Loading branch information
Rich-Harris committed Dec 14, 2016
2 parents 4851ed5 + c1a9255 commit 0693d1f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var bar;
module.exports = bar = function foo () {};
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var bar;
var input = bar = function foo () {};

export default input;
export { input as __moduleExports };
3 changes: 3 additions & 0 deletions test/form/optimised-default-export-iife/input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = (function foo () {
return function fooChild() {};
}());
6 changes: 6 additions & 0 deletions test/form/optimised-default-export-iife/output.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var input = (function foo () {
return function fooChild() {};
}());

export default input;
export { input as __moduleExports };

0 comments on commit 0693d1f

Please sign in to comment.