Fix: export default arrows with function naming (#4524)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
export default () => ({
|
||||
x: ({x}) => {}
|
||||
})
|
||||
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function () {
|
||||
return {
|
||||
x: function x(_ref) {
|
||||
var _x = _ref.x;
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"presets": ["es2015"]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export default ({ onClick }) => (
|
||||
<div onClick={() => onClick()} />
|
||||
)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (_ref) {
|
||||
var _onClick = _ref.onClick;
|
||||
return React.createElement("div", { onClick: function onClick() {
|
||||
return _onClick();
|
||||
} });
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"presets": ["es2015", "react"]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export default (a) => {
|
||||
return { a() { return a } };
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports["default"] = function (_a) {
|
||||
return {
|
||||
a: function a() {
|
||||
return _a;
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [
|
||||
"transform-es3-member-expression-literals",
|
||||
"transform-es3-property-literals"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export default (a) => {
|
||||
return { a() { return a } };
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (_a) {
|
||||
return {
|
||||
a: function a() {
|
||||
return _a;
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["transform-es2015-function-name", "transform-es2015-shorthand-properties", "transform-es2015-arrow-functions", "transform-es2015-modules-commonjs"]
|
||||
}
|
||||
Reference in New Issue
Block a user