source: trip-planner-front/node_modules/babel-plugin-dynamic-import-node/lib/index.js@ e29cc2e

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

initial commit

  • Property mode set to 100644
File size: 841 bytes
Line 
1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6
7exports['default'] = function (api) {
8 var transformImport = (0, _utils.createDynamicImportTransform)(api);
9
10 return {
11 // NOTE: Once we drop support for Babel <= v6 we should
12 // update this to import from @babel/plugin-syntax-dynamic-import.
13 // https://www.npmjs.com/package/@babel/plugin-syntax-dynamic-import
14 manipulateOptions: function () {
15 function manipulateOptions(opts, parserOpts) {
16 parserOpts.plugins.push('dynamicImport');
17 }
18
19 return manipulateOptions;
20 }(),
21
22
23 visitor: {
24 Import: function () {
25 function Import(path) {
26 transformImport(this, path);
27 }
28
29 return Import;
30 }()
31 }
32 };
33};
34
35var _utils = require('./utils');
36
37module.exports = exports['default'];
Note: See TracBrowser for help on using the repository browser.