fix default exported classes without a name (#4518)

* fix default exported classes without a name

This correctly requeues class without name so the es3 transform can
transform the default keyword.

* Replace phabricator issue number with github
This commit is contained in:
Daniel Tschinder
2016-09-18 04:50:54 +02:00
committed by Henry Zhu
parent 590ad4d24f
commit cbbc1c7333
13 changed files with 65 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = class {};

View File

@@ -0,0 +1,7 @@
{
"plugins": [
"transform-es2015-modules-commonjs",
"transform-es3-member-expression-literals",
"transform-es3-property-literals"
]
}

View File

@@ -0,0 +1 @@
export default function () {}

View File

@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = function () {};

View File

@@ -0,0 +1,7 @@
{
"plugins": [
"transform-es2015-modules-commonjs",
"transform-es3-member-expression-literals",
"transform-es3-property-literals"
]
}

View File

@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
class Foo {}
exports["default"] = Foo;

View File

@@ -0,0 +1,7 @@
{
"plugins": [
"transform-es2015-modules-commonjs",
"transform-es3-member-expression-literals",
"transform-es3-property-literals"
]
}

View File

@@ -0,0 +1 @@
export default function bat () {}

View File

@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = bat;
function bat() {}

View File

@@ -0,0 +1,7 @@
{
"plugins": [
"transform-es2015-modules-commonjs",
"transform-es3-member-expression-literals",
"transform-es3-property-literals"
]
}