保誠-保戶業務員媒合平台
HelenHuang
2022-06-09 26a09f08cf1ed43c640879f23fdad56c5c9282f7
PAMapp/node_modules/@babel/plugin-transform-runtime/lib/index.js
@@ -80,15 +80,17 @@
    throw new Error(`The 'version' option must be a version string.`);
  }
  const DUAL_MODE_RUNTIME = "7.13.0";
  const supportsCJSDefault = (0, _helpers.hasMinVersion)(DUAL_MODE_RUNTIME, runtimeVersion);
  {
    const DUAL_MODE_RUNTIME = "7.13.0";
    var supportsCJSDefault = (0, _helpers.hasMinVersion)(DUAL_MODE_RUNTIME, runtimeVersion);
  }
  function has(obj, key) {
    return Object.prototype.hasOwnProperty.call(obj, key);
  }
  if (has(options, "useBuiltIns")) {
    if (options.useBuiltIns) {
    if (options["useBuiltIns"]) {
      throw new Error("The 'useBuiltIns' option has been removed. The @babel/runtime " + "module now uses builtins by default.");
    } else {
      throw new Error("The 'useBuiltIns' option has been removed. Use the 'corejs'" + "option to polyfill with `core-js` via @babel/runtime.");
@@ -96,7 +98,7 @@
  }
  if (has(options, "polyfill")) {
    if (options.polyfill === false) {
    if (options["polyfill"] === false) {
      throw new Error("The 'polyfill' option has been removed. The @babel/runtime " + "module now skips polyfilling by default.");
    } else {
      throw new Error("The 'polyfill' option has been removed. Use the 'corejs'" + "option to polyfill with `core-js` via @babel/runtime.");
@@ -129,18 +131,19 @@
    };
  }
  const corejsExt = absoluteRuntime ? ".js" : "";
  return {
    name: "transform-runtime",
    inherits: injectCoreJS2 ? createCorejsPlgin(pluginCorejs2, {
      method: "usage-pure",
      absoluteImports: absoluteRuntime ? modulePath : false,
      [pluginsCompat]: {
        runtimeVersion,
        useBabelRuntime: modulePath,
        ext: corejsExt
        ext: ""
      }
    }, createRegeneratorPlugin({
      method: "usage-pure",
      absoluteImports: absoluteRuntime ? modulePath : false,
      [pluginsCompat]: {
        useBabelRuntime: modulePath
      }
@@ -148,17 +151,20 @@
      method: "usage-pure",
      version: 3,
      proposals,
      absoluteImports: absoluteRuntime ? modulePath : false,
      [pluginsCompat]: {
        useBabelRuntime: modulePath,
        ext: corejsExt
        ext: ""
      }
    }, createRegeneratorPlugin({
      method: "usage-pure",
      absoluteImports: absoluteRuntime ? modulePath : false,
      [pluginsCompat]: {
        useBabelRuntime: modulePath
      }
    })) : createRegeneratorPlugin({
      method: "usage-pure",
      absoluteImports: absoluteRuntime ? modulePath : false,
      [pluginsCompat]: {
        useBabelRuntime: modulePath
      }
@@ -174,7 +180,9 @@
        const isInteropHelper = HEADER_HELPERS.indexOf(name) !== -1;
        const blockHoist = isInteropHelper && !(0, _helperModuleImports.isModule)(file.path) ? 4 : undefined;
        const helpersDir = esModules && file.path.node.sourceType === "module" ? "helpers/esm" : "helpers";
        return addDefaultImport(`${modulePath}/${helpersDir}/${name}`, name, blockHoist, true);
        let helperPath = `${modulePath}/${helpersDir}/${name}`;
        if (absoluteRuntime) helperPath = (0, _getRuntimePath.resolveFSPath)(helperPath);
        return addDefaultImport(helperPath, name, blockHoist, true);
      });
      const cache = new Map();