Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports.transform = ({ src, filename, options }) => {
if (filename.endsWith('.styl')) {
return stylusTransformer.transform({ src, filename, options });
}
if (filename.endsWith('.css')) {
return cssTransformer.transform({ src, filename, options });
}
if (filename.endsWith('.ts') || filename.endsWith('.tsx')) {
return typescriptTransformer.transform({ src, filename, options });
}
return upstreamTransformer.transform({ src, filename, options });
};