jiangchengfeiyi-xiaochengxu/node_modules/@babel/runtime/helpers/tsRewriteRelativeImportExtensions.js
2025-04-02 23:45:33 +08:00

6 lines
427 B
JavaScript

function tsRewriteRelativeImportExtensions(t, e) {
return "string" == typeof t && /^\.\.?\//.test(t) ? t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i, function (t, s, r, n, o) {
return s ? e ? ".jsx" : ".js" : !r || n && o ? r + n + "." + o.toLowerCase() + "js" : t;
}) : t;
}
module.exports = tsRewriteRelativeImportExtensions, module.exports.__esModule = true, module.exports["default"] = module.exports;