-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
export as
module.exports
if there are no other ExportDeclarations i…
…n commonInterop module formatter @guybedford
- Loading branch information
Showing
7 changed files
with
125 additions
and
29 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
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 @@ | ||
module.exports = VALUE; |
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
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
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
16 changes: 8 additions & 8 deletions
16
test/fixtures/transformation/es6-modules-common-interop/exports-default/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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
"use strict"; | ||
|
||
exports["default"] = 42; | ||
exports["default"] = {}; | ||
exports["default"] = []; | ||
exports["default"] = foo; | ||
exports["default"] = function () {}; | ||
exports["default"] = function () {}; | ||
module.exports = foo; | ||
module.exports = 42; | ||
module.exports = {}; | ||
module.exports = []; | ||
module.exports = foo; | ||
module.exports = function () {}; | ||
module.exports = function () {}; | ||
function foo() {} | ||
exports["default"] = foo; | ||
var Foo = function Foo() {}; | ||
|
||
exports["default"] = Foo; | ||
module.exports = Foo; |
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