index.js 1.4 KB

123456789101112131415161718192021222324252627
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.default = void 0;
  4. var _path = _interopRequireDefault(require("path"));
  5. var _helperPluginUtils = require("@babel/helper-plugin-utils");
  6. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  7. /**
  8. * @babel/preset-modules produces clean, minimal output for ES Modules-supporting browsers.
  9. * @param {Object} [options]
  10. * @param {boolean} [options.loose=false] Loose mode skips seldom-needed transforms that increase output size.
  11. */
  12. var _default = (0, _helperPluginUtils.declare)((api, opts) => {
  13. api.assertVersion(7);
  14. const loose = opts.loose === true;
  15. return {
  16. plugins: [_path.default.resolve(__dirname, "./plugins/transform-edge-default-parameters"), _path.default.resolve(__dirname, "./plugins/transform-tagged-template-caching"), _path.default.resolve(__dirname, "./plugins/transform-jsx-spread"), _path.default.resolve(__dirname, "./plugins/transform-safari-for-shadowing"), _path.default.resolve(__dirname, "./plugins/transform-safari-block-shadowing"), _path.default.resolve(__dirname, "./plugins/transform-async-arrows-in-class"), !loose && _path.default.resolve(__dirname, "./plugins/transform-edge-function-name"), // Proposals
  17. require.resolve("@babel/plugin-proposal-unicode-property-regex"), require.resolve("@babel/plugin-transform-dotall-regex")].filter(Boolean)
  18. };
  19. });
  20. exports.default = _default;
  21. module.exports = exports.default;