challenge-algorithms-v2.0-u.../node_modules/@babel/helper-module-transforms/lib/dynamic-import.js

18 lines
468 B
JavaScript
Raw Permalink Normal View History

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getDynamicImportSource = getDynamicImportSource;
var t = require("@babel/types");
var _template = require("@babel/template");
function getDynamicImportSource(node) {
const [source] = node.arguments;
return t.isStringLiteral(source) || t.isTemplateLiteral(source) ? source : _template.default.expression.ast`\`\${${source}}\``;
}
//# sourceMappingURL=dynamic-import.js.map