Mark transpiled JSX elements as pure (#11126)
* Mark transpiled JSX elements as pure * Avoid duble annotation * Add "pure" option to the React preset * Fix generator indentation * Update tests * Add tests for the "pure" option * Update windows fixtures
This commit is contained in:
@@ -24,9 +24,9 @@ var RandomComponent = /*#__PURE__*/function (_Component) {
|
||||
babelHelpers.createClass(RandomComponent, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
return _react["default"].createElement("div", {
|
||||
return /*#__PURE__*/_react["default"].createElement("div", {
|
||||
className: "sui-RandomComponent"
|
||||
}, _react["default"].createElement("h2", null, "Hi there!"));
|
||||
}, /*#__PURE__*/_react["default"].createElement("h2", null, "Hi there!"));
|
||||
}
|
||||
}]);
|
||||
return RandomComponent;
|
||||
|
||||
@@ -6,16 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
||||
exports["default"] = _default;
|
||||
|
||||
function _default() {
|
||||
return (/*#__PURE__*/function () {
|
||||
function Select() {
|
||||
babelHelpers.classCallCheck(this, Select);
|
||||
}
|
||||
return /*#__PURE__*/function () {
|
||||
function Select() {
|
||||
babelHelpers.classCallCheck(this, Select);
|
||||
}
|
||||
|
||||
babelHelpers.createClass(Select, [{
|
||||
key: "query",
|
||||
value: function query(_query) {}
|
||||
}]);
|
||||
return Select;
|
||||
}()
|
||||
);
|
||||
babelHelpers.createClass(Select, [{
|
||||
key: "query",
|
||||
value: function query(_query) {}
|
||||
}]);
|
||||
return Select;
|
||||
}();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user