diff --git a/lib/6to5/transformation/modules/_strict.js b/lib/6to5/transformation/modules/_strict.js index de55735733..5fa3c9f57f 100644 --- a/lib/6to5/transformation/modules/_strict.js +++ b/lib/6to5/transformation/modules/_strict.js @@ -4,7 +4,7 @@ var util = require("../../util"); module.exports = function (Parent) { var Constructor = function () { - this.noInteropRequire = true; + this.noInteropRequireExport = true; Parent.apply(this, arguments); }; diff --git a/test/fixtures/transformation/es6-modules-common-standard/export-1/actual.js b/test/fixtures/transformation/es6-modules-common-standard/export-1/actual.js new file mode 100644 index 0000000000..f7b318b3f6 --- /dev/null +++ b/test/fixtures/transformation/es6-modules-common-standard/export-1/actual.js @@ -0,0 +1 @@ +export default foo; diff --git a/test/fixtures/transformation/es6-modules-common-standard/export-1/expected.js b/test/fixtures/transformation/es6-modules-common-standard/export-1/expected.js new file mode 100644 index 0000000000..d4479d5ef3 --- /dev/null +++ b/test/fixtures/transformation/es6-modules-common-standard/export-1/expected.js @@ -0,0 +1,3 @@ +"use strict"; + +exports["default"] = foo; diff --git a/test/fixtures/transformation/es6-modules-common-standard/export-2/actual.js b/test/fixtures/transformation/es6-modules-common-standard/export-2/actual.js new file mode 100644 index 0000000000..95daad9d96 --- /dev/null +++ b/test/fixtures/transformation/es6-modules-common-standard/export-2/actual.js @@ -0,0 +1 @@ +export { foo as default }; diff --git a/test/fixtures/transformation/es6-modules-common-standard/export-2/expected.js b/test/fixtures/transformation/es6-modules-common-standard/export-2/expected.js new file mode 100644 index 0000000000..d4479d5ef3 --- /dev/null +++ b/test/fixtures/transformation/es6-modules-common-standard/export-2/expected.js @@ -0,0 +1,3 @@ +"use strict"; + +exports["default"] = foo; diff --git a/test/fixtures/transformation/es6-modules-common-standard/export/actual.js b/test/fixtures/transformation/es6-modules-common-standard/export/actual.js index 093270a9e9..f99d427777 100644 --- a/test/fixtures/transformation/es6-modules-common-standard/export/actual.js +++ b/test/fixtures/transformation/es6-modules-common-standard/export/actual.js @@ -1,3 +1 @@ export function foo() {} -export default foo; -export { foo as default, foo }; diff --git a/test/fixtures/transformation/es6-modules-common-standard/export/expected.js b/test/fixtures/transformation/es6-modules-common-standard/export/expected.js index 17638c0e34..f9946c5270 100644 --- a/test/fixtures/transformation/es6-modules-common-standard/export/expected.js +++ b/test/fixtures/transformation/es6-modules-common-standard/export/expected.js @@ -2,6 +2,3 @@ exports.foo = foo; function foo() {} -exports["default"] = foo; -exports["default"] = foo; -exports.foo = foo;