8889841cREADME.md000066600000000612150515201010006014 0ustar00# @babel/plugin-proposal-dynamic-import > Transform import() expressions See our website [@babel/plugin-proposal-dynamic-import](https://babeljs.io/docs/en/babel-plugin-proposal-dynamic-import) for more information. ## Install Using npm: ```sh npm install --save-dev @babel/plugin-proposal-dynamic-import ``` or using yarn: ```sh yarn add @babel/plugin-proposal-dynamic-import --dev ``` lib/index.js000066600000002474150515201010006760 0ustar00"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _helperPluginUtils = require("@babel/helper-plugin-utils"); var _pluginSyntaxDynamicImport = require("@babel/plugin-syntax-dynamic-import"); const SUPPORTED_MODULES = ["commonjs", "amd", "systemjs"]; const MODULES_NOT_FOUND = `\ @babel/plugin-proposal-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: "proposal-dynamic-import", inherits: _pluginSyntaxDynamicImport.default, pre() { this.file.set("@babel/plugin-proposal-dynamic-import", "7.18.6"); }, 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;LICENSE000066600000002122150515201010005540 0ustar00MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. package.json000066600000001474150515201010007032 0ustar00{ "name": "@babel/plugin-proposal-dynamic-import", "version": "7.18.6", "description": "Transform import() expressions", "repository": { "type": "git", "url": "https://github.com/babel/babel.git", "directory": "packages/babel-plugin-proposal-dynamic-import" }, "license": "MIT", "publishConfig": { "access": "public" }, "main": "./lib/index.js", "keywords": [ "babel-plugin" ], "dependencies": { "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-dynamic-import": "^7.8.3" }, "peerDependencies": { "@babel/core": "^7.0.0-0" }, "devDependencies": { "@babel/core": "^7.18.6", "@babel/helper-plugin-test-runner": "^7.18.6" }, "engines": { "node": ">=6.9.0" }, "author": "The Babel Team (https://babel.dev/team)", "type": "commonjs" }