Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure unused default exports are deconflicted when tree-shaking i…
…s false (#2758)
- Loading branch information
1 parent
88ceebd
commit 26d2b31
Showing
5 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
test/form/samples/no-treeshake-default-export-conflict/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
description: 'properly deconflicts default exports when not tree-shaking', | ||
options: { | ||
treeshake: false | ||
} | ||
}; |
7 changes: 7 additions & 0 deletions
7
test/form/samples/no-treeshake-default-export-conflict/_expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function foo() { | ||
return 'foo'; | ||
} | ||
|
||
function foo$1() { | ||
return 'default'; | ||
} |
7 changes: 7 additions & 0 deletions
7
test/form/samples/no-treeshake-default-export-conflict/foo.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export function foo() { | ||
return 'foo'; | ||
} | ||
|
||
export default function() { | ||
return 'default'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import './foo'; |