index.js 629 B

12345678910111213141516171819202122232425262728293031323334
  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. var _default = (0, _helperPluginUtils().declare)(api => {
  14. api.assertVersion(7);
  15. return {
  16. name: "syntax-jsx",
  17. manipulateOptions(opts, parserOpts) {
  18. if (parserOpts.plugins.some(p => (Array.isArray(p) ? p[0] : p) === "typescript")) {
  19. return;
  20. }
  21. parserOpts.plugins.push("jsx");
  22. }
  23. };
  24. });
  25. exports.default = _default;