index.js 527 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _helperPluginUtils = require("@babel/helper-plugin-utils");
  7. var _default = (0, _helperPluginUtils.declare)(api => {
  8. api.assertVersion(7);
  9. return {
  10. name: "syntax-jsx",
  11. manipulateOptions(opts, parserOpts) {
  12. if (parserOpts.plugins.some(p => (Array.isArray(p) ? p[0] : p) === "typescript")) {
  13. return;
  14. }
  15. parserOpts.plugins.push("jsx");
  16. }
  17. };
  18. });
  19. exports.default = _default;