From aa773172311dcada759dfbaac485f4bc6e00bc21 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 14 Oct 2023 15:31:11 +0800 Subject: added babel --- .../plugin-transform-dynamic-import/lib/index.js | 41 ++++++++++++++++++++++ .../lib/index.js.map | 1 + 2 files changed, 42 insertions(+) create mode 100644 node_modules/@babel/plugin-transform-dynamic-import/lib/index.js create mode 100644 node_modules/@babel/plugin-transform-dynamic-import/lib/index.js.map (limited to 'node_modules/@babel/plugin-transform-dynamic-import/lib') diff --git a/node_modules/@babel/plugin-transform-dynamic-import/lib/index.js b/node_modules/@babel/plugin-transform-dynamic-import/lib/index.js new file mode 100644 index 00000000..091c5013 --- /dev/null +++ b/node_modules/@babel/plugin-transform-dynamic-import/lib/index.js @@ -0,0 +1,41 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _helperPluginUtils = require("@babel/helper-plugin-utils"); +const SUPPORTED_MODULES = ["commonjs", "amd", "systemjs"]; +const MODULES_NOT_FOUND = `\ +@babel/plugin-transform-dynamic-import depends on a modules +transform plugin. Supported plugins are: + - @babel/plugin-transform-modules-commonjs ^7.4.0 + - @babel/plugin-transform-modules-amd ^7.4.0 + - @babel/plugin-transform-modules-systemjs ^7.4.0 + +If you are using Webpack or Rollup and thus don't want +Babel to transpile your imports and exports, you can use +the @babel/plugin-syntax-dynamic-import plugin and let your +bundler handle dynamic imports. +`; +var _default = (0, _helperPluginUtils.declare)(api => { + api.assertVersion(7); + return { + name: "transform-dynamic-import", + inherits: require("@babel/plugin-syntax-dynamic-import").default, + pre() { + this.file.set("@babel/plugin-proposal-dynamic-import", "7.22.11"); + }, + visitor: { + Program() { + const modules = this.file.get("@babel/plugin-transform-modules-*"); + if (!SUPPORTED_MODULES.includes(modules)) { + throw new Error(MODULES_NOT_FOUND); + } + } + } + }; +}); +exports.default = _default; + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/plugin-transform-dynamic-import/lib/index.js.map b/node_modules/@babel/plugin-transform-dynamic-import/lib/index.js.map new file mode 100644 index 00000000..b3523d51 --- /dev/null +++ b/node_modules/@babel/plugin-transform-dynamic-import/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_helperPluginUtils","require","SUPPORTED_MODULES","MODULES_NOT_FOUND","_default","declare","api","assertVersion","name","inherits","default","pre","file","set","visitor","Program","modules","get","includes","Error","exports"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\n\nconst SUPPORTED_MODULES = [\"commonjs\", \"amd\", \"systemjs\"];\n\nconst MODULES_NOT_FOUND = `\\\n@babel/plugin-transform-dynamic-import depends on a modules\ntransform plugin. Supported plugins are:\n - @babel/plugin-transform-modules-commonjs ^7.4.0\n - @babel/plugin-transform-modules-amd ^7.4.0\n - @babel/plugin-transform-modules-systemjs ^7.4.0\n\nIf you are using Webpack or Rollup and thus don't want\nBabel to transpile your imports and exports, you can use\nthe @babel/plugin-syntax-dynamic-import plugin and let your\nbundler handle dynamic imports.\n`;\n\nexport default declare(api => {\n api.assertVersion(7);\n\n return {\n name: \"transform-dynamic-import\",\n inherits: USE_ESM\n ? undefined\n : IS_STANDALONE\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-dynamic-import\").default,\n\n pre() {\n // We keep using the old name, for compatibility with older\n // version of the CommonJS transform.\n this.file.set(\n \"@babel/plugin-proposal-dynamic-import\",\n PACKAGE_JSON.version,\n );\n },\n\n visitor: {\n Program() {\n const modules = this.file.get(\"@babel/plugin-transform-modules-*\");\n\n if (!SUPPORTED_MODULES.includes(modules)) {\n throw new Error(MODULES_NOT_FOUND);\n }\n },\n },\n };\n});\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAEA,MAAMC,iBAAiB,GAAG,CAAC,UAAU,EAAE,KAAK,EAAE,UAAU,CAAC;AAEzD,MAAMC,iBAAiB,GAAI;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAAC,IAAAC,QAAA,GAEa,IAAAC,0BAAO,EAACC,GAAG,IAAI;EAC5BA,GAAG,CAACC,aAAa,CAAC,CAAC,CAAC;EAEpB,OAAO;IACLC,IAAI,EAAE,0BAA0B;IAChCC,QAAQ,EAKJR,OAAO,CAAC,qCAAqC,CAAC,CAACS,OAAO;IAE1DC,GAAGA,CAAA,EAAG;MAGJ,IAAI,CAACC,IAAI,CAACC,GAAG,CACX,uCAAuC,WAEzC,CAAC;IACH,CAAC;IAEDC,OAAO,EAAE;MACPC,OAAOA,CAAA,EAAG;QACR,MAAMC,OAAO,GAAG,IAAI,CAACJ,IAAI,CAACK,GAAG,CAAC,mCAAmC,CAAC;QAElE,IAAI,CAACf,iBAAiB,CAACgB,QAAQ,CAACF,OAAO,CAAC,EAAE;UACxC,MAAM,IAAIG,KAAK,CAAChB,iBAAiB,CAAC;QACpC;MACF;IACF;EACF,CAAC;AACH,CAAC,CAAC;AAAAiB,OAAA,CAAAV,OAAA,GAAAN,QAAA"} \ No newline at end of file -- cgit v1.2.3