summaryrefslogtreecommitdiff
path: root/node_modules/@babel/plugin-transform-modules-commonjs/lib/lazy.js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:10:59 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:41:44 +0800
commitfc87c009806dcc98867f6b58efe29b042aa01dee (patch)
tree8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/@babel/plugin-transform-modules-commonjs/lib/lazy.js
parent3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff)
node: updatemain
Diffstat (limited to 'node_modules/@babel/plugin-transform-modules-commonjs/lib/lazy.js')
-rw-r--r--node_modules/@babel/plugin-transform-modules-commonjs/lib/lazy.js44
1 files changed, 0 insertions, 44 deletions
diff --git a/node_modules/@babel/plugin-transform-modules-commonjs/lib/lazy.js b/node_modules/@babel/plugin-transform-modules-commonjs/lib/lazy.js
deleted file mode 100644
index 46496cb5..00000000
--- a/node_modules/@babel/plugin-transform-modules-commonjs/lib/lazy.js
+++ /dev/null
@@ -1,44 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.lazyImportsHook = void 0;
-var _core = require("@babel/core");
-var _helperModuleTransforms = require("@babel/helper-module-transforms");
-const lazyImportsHook = lazy => ({
- name: `${"@babel/plugin-transform-modules-commonjs"}/lazy`,
- version: "7.25.7",
- getWrapperPayload(source, metadata) {
- if ((0, _helperModuleTransforms.isSideEffectImport)(metadata) || metadata.reexportAll) {
- return null;
- }
- if (lazy === true) {
- return source.includes(".") ? null : "lazy/function";
- }
- if (Array.isArray(lazy)) {
- return !lazy.includes(source) ? null : "lazy/function";
- }
- if (typeof lazy === "function") {
- return lazy(source) ? "lazy/function" : null;
- }
- },
- buildRequireWrapper(name, init, payload, referenced) {
- if (payload === "lazy/function") {
- if (!referenced) return false;
- return _core.template.statement.ast`
- function ${name}() {
- const data = ${init};
- ${name} = function(){ return data; };
- return data;
- }
- `;
- }
- },
- wrapReference(ref, payload) {
- if (payload === "lazy/function") return _core.types.callExpression(ref, []);
- }
-});
-exports.lazyImportsHook = lazyImportsHook;
-
-//# sourceMappingURL=lazy.js.map