From 26a09f08cf1ed43c640879f23fdad56c5c9282f7 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期四, 09 六月 2022 15:02:38 +0800
Subject: [PATCH] TODO#139884 Banner 1 文案調整

---
 PAMapp/node_modules/@babel/plugin-transform-runtime/lib/index.js |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/PAMapp/node_modules/@babel/plugin-transform-runtime/lib/index.js b/PAMapp/node_modules/@babel/plugin-transform-runtime/lib/index.js
index 9e57754..8b3316d 100644
--- a/PAMapp/node_modules/@babel/plugin-transform-runtime/lib/index.js
+++ b/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();
 

--
Gitblit v1.8.0