diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:10:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:41:44 +0800 |
| commit | fc87c009806dcc98867f6b58efe29b042aa01dee (patch) | |
| tree | 8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/@babel/plugin-transform-modules-commonjs/lib/hooks.js | |
| parent | 3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff) | |
node: updatemain
Diffstat (limited to 'node_modules/@babel/plugin-transform-modules-commonjs/lib/hooks.js')
| -rw-r--r-- | node_modules/@babel/plugin-transform-modules-commonjs/lib/hooks.js | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/node_modules/@babel/plugin-transform-modules-commonjs/lib/hooks.js b/node_modules/@babel/plugin-transform-modules-commonjs/lib/hooks.js deleted file mode 100644 index af92a650..00000000 --- a/node_modules/@babel/plugin-transform-modules-commonjs/lib/hooks.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.defineCommonJSHook = defineCommonJSHook; -exports.makeInvokers = makeInvokers; -const commonJSHooksKey = "@babel/plugin-transform-modules-commonjs/customWrapperPlugin"; -function defineCommonJSHook(file, hook) { - let hooks = file.get(commonJSHooksKey); - if (!hooks) file.set(commonJSHooksKey, hooks = []); - hooks.push(hook); -} -function findMap(arr, cb) { - if (arr) { - for (const el of arr) { - const res = cb(el); - if (res != null) return res; - } - } -} -function makeInvokers(file) { - const hooks = file.get(commonJSHooksKey); - return { - getWrapperPayload(...args) { - return findMap(hooks, hook => hook.getWrapperPayload == null ? void 0 : hook.getWrapperPayload(...args)); - }, - wrapReference(...args) { - return findMap(hooks, hook => hook.wrapReference == null ? void 0 : hook.wrapReference(...args)); - }, - buildRequireWrapper(...args) { - return findMap(hooks, hook => hook.buildRequireWrapper == null ? void 0 : hook.buildRequireWrapper(...args)); - } - }; -} - -//# sourceMappingURL=hooks.js.map |
