Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
meta,
headers,
} = rewriteModuleStatementsAndPrepareHeader(path, {
loose,
strict,
strictMode,
allowTopLevelThis,
noInterop,
});
const amdArgs = [];
const commonjsArgs = [];
const browserArgs = [];
const importNames = [];
if (hasExports(meta)) {
amdArgs.push(t.stringLiteral("exports"));
commonjsArgs.push(t.identifier("exports"));
browserArgs.push(
t.memberExpression(t.identifier("mod"), t.identifier("exports")),
);
importNames.push(t.identifier(meta.exportName));
}
for (const [source, metadata] of meta.source) {
amdArgs.push(t.stringLiteral(source));
commonjsArgs.push(
t.callExpression(t.identifier("require"), [
t.stringLiteral(source),
]),
);
browserArgs.push(
const {
meta,
headers,
} = rewriteModuleStatementsAndPrepareHeader(path, {
loose,
strict,
strictMode,
allowTopLevelThis,
noInterop,
});
const amdArgs = [];
const importNames = [];
if (hasExports(meta)) {
amdArgs.push(t.stringLiteral("exports"));
importNames.push(t.identifier(meta.exportName));
}
for (const [source, metadata] of meta.source) {
amdArgs.push(t.stringLiteral(source));
importNames.push(t.identifier(metadata.name));
if (!isSideEffectImport(metadata)) {
const interop = wrapInterop(
path,
t.identifier(metadata.name),
metadata.interop,
);
if (interop) {
let moduleName = this.getModuleName();
if (moduleName) moduleName = t.stringLiteral(moduleName);
const { meta, headers } = rewriteModuleStatementsAndPrepareHeader(
path,
{
loose,
strict,
strictMode,
allowTopLevelThis,
noInterop,
},
);
if (hasExports(meta)) {
amdArgs.push(t.stringLiteral("exports"));
importNames.push(t.identifier(meta.exportName));
}
for (const [source, metadata] of meta.source) {
amdArgs.push(t.stringLiteral(source));
importNames.push(t.identifier(metadata.name));
if (!isSideEffectImport(metadata)) {
const interop = wrapInterop(
path,
t.identifier(metadata.name),
metadata.interop,
);
if (interop) {
path,
{
loose,
strict,
strictMode,
allowTopLevelThis,
noInterop,
},
);
const amdArgs = [];
const commonjsArgs = [];
const browserArgs = [];
const importNames = [];
if (hasExports(meta)) {
amdArgs.push(t.stringLiteral("exports"));
commonjsArgs.push(t.identifier("exports"));
browserArgs.push(
t.memberExpression(t.identifier("mod"), t.identifier("exports")),
);
importNames.push(t.identifier(meta.exportName));
}
for (const [source, metadata] of meta.source) {
amdArgs.push(t.stringLiteral(source));
commonjsArgs.push(
t.callExpression(t.identifier("require"), [
t.stringLiteral(source),
]),
);
browserArgs.push(