cat-bookmarker/assets/node_modules/babel-plugin-transform-reac.../lib/index.js

26 lines
486 B
JavaScript
Raw Normal View History

2024-03-10 18:52:04 +00:00
"use strict";
exports.__esModule = true;
exports.default = function (_ref) {
var t = _ref.types;
var visitor = {
JSXOpeningElement: function JSXOpeningElement(_ref2) {
var node = _ref2.node;
var id = t.jSXIdentifier(TRACE_ID);
var trace = t.thisExpression();
node.attributes.push(t.jSXAttribute(id, t.jSXExpressionContainer(trace)));
}
};
return {
visitor: visitor
};
};
var TRACE_ID = "__self";
module.exports = exports["default"];