You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
354 B
6 lines
354 B
![]()
2 weeks ago
|
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;
|
||
|
}
|
||
|
export { tsRewriteRelativeImportExtensions as default };
|