Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
path.endsWith(".scss") ||
path.endsWith(".css") ||
path.endsWith(".sass")
) {
return "module.exports = new Proxy({}, { get: function (target, name) { return name; } });";
}
if (path.endsWith(".svg")) {
const pathArr = path.split("/");
const iconFileName = encodeURIComponent(
pathArr[pathArr.length - 1].replace(".svg", "")
);
return `module.exports = new Proxy({}, { get: function () { return "${iconFileName.trim()}"; } });`;
}
const typeParsedResult = tsPreProcessor.process(src, path, config);
return typeParsedResult;
}
};
process(src, path, options, transpileOptions) {
if (path.endsWith('.js') || path.endsWith('.ts')) {
const code = tsJest.process(src, path, options, transpileOptions);
return transpile(code, path);
}
return src;
}
};
process(src, path, config, transpileConfig) {
if (path.endsWith('.js') || path.endsWith('.ts')) {
const tsc = tsJest.process(src, path, config, transpileConfig);
return transpile(tsc, path);
}
return src;
}
};