source: trip-planner-front/node_modules/@babel/plugin-proposal-dynamic-import/lib/index.js@ 571e0df

Last change on this file since 571e0df was e29cc2e, checked in by Ema <ema_spirova@…>, 3 years ago

primeNG components

  • Property mode set to 100644
File size: 1.3 KB
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = void 0;
7
8var _helperPluginUtils = require("@babel/helper-plugin-utils");
9
10var _pluginSyntaxDynamicImport = require("@babel/plugin-syntax-dynamic-import");
11
12const SUPPORTED_MODULES = ["commonjs", "amd", "systemjs"];
13const MODULES_NOT_FOUND = `\
14@babel/plugin-proposal-dynamic-import depends on a modules
15transform plugin. Supported plugins are:
16 - @babel/plugin-transform-modules-commonjs ^7.4.0
17 - @babel/plugin-transform-modules-amd ^7.4.0
18 - @babel/plugin-transform-modules-systemjs ^7.4.0
19
20If you are using Webpack or Rollup and thus don't want
21Babel to transpile your imports and exports, you can use
22the @babel/plugin-syntax-dynamic-import plugin and let your
23bundler handle dynamic imports.
24`;
25
26var _default = (0, _helperPluginUtils.declare)(api => {
27 api.assertVersion(7);
28 return {
29 name: "proposal-dynamic-import",
30 inherits: _pluginSyntaxDynamicImport.default,
31
32 pre() {
33 this.file.set("@babel/plugin-proposal-dynamic-import", "7.16.0");
34 },
35
36 visitor: {
37 Program() {
38 const modules = this.file.get("@babel/plugin-transform-modules-*");
39
40 if (!SUPPORTED_MODULES.includes(modules)) {
41 throw new Error(MODULES_NOT_FOUND);
42 }
43 }
44
45 }
46 };
47});
48
49exports.default = _default;
Note: See TracBrowser for help on using the repository browser.