resolve-targets-browser.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.resolveBrowserslistConfigFile = resolveBrowserslistConfigFile;
  6. exports.resolveTargets = resolveTargets;
  7. function _helperCompilationTargets() {
  8. const data = require("@babel/helper-compilation-targets");
  9. _helperCompilationTargets = function () {
  10. return data;
  11. };
  12. return data;
  13. }
  14. function resolveBrowserslistConfigFile(browserslistConfigFile, configFilePath) {
  15. return undefined;
  16. }
  17. function resolveTargets(options, root) {
  18. const optTargets = options.targets;
  19. let targets;
  20. if (typeof optTargets === "string" || Array.isArray(optTargets)) {
  21. targets = {
  22. browsers: optTargets
  23. };
  24. } else if (optTargets) {
  25. if ("esmodules" in optTargets) {
  26. targets = Object.assign({}, optTargets, {
  27. esmodules: "intersect"
  28. });
  29. } else {
  30. targets = optTargets;
  31. }
  32. }
  33. return (0, _helperCompilationTargets().default)(targets, {
  34. ignoreBrowserslistConfig: true,
  35. browserslistEnv: options.browserslistEnv
  36. });
  37. }
  38. 0 && 0;
  39. //# sourceMappingURL=resolve-targets-browser.js.map