Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 895B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. function _helperPluginUtils() {
  7. const data = require("@babel/helper-plugin-utils");
  8. _helperPluginUtils = function () {
  9. return data;
  10. };
  11. return data;
  12. }
  13. function _core() {
  14. const data = require("@babel/core");
  15. _core = function () {
  16. return data;
  17. };
  18. return data;
  19. }
  20. const TRACE_ID = "__self";
  21. var _default = (0, _helperPluginUtils().declare)(api => {
  22. api.assertVersion(7);
  23. const visitor = {
  24. JSXOpeningElement({
  25. node
  26. }) {
  27. const id = _core().types.jsxIdentifier(TRACE_ID);
  28. const trace = _core().types.thisExpression();
  29. node.attributes.push(_core().types.jsxAttribute(id, _core().types.jsxExpressionContainer(trace)));
  30. }
  31. };
  32. return {
  33. name: "transform-react-jsx-self",
  34. visitor
  35. };
  36. });
  37. exports.default = _default;