diff --git a/src/loader.ts b/src/loader.ts index 6f0b195..bcf4a17 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -91,7 +91,7 @@ export const resolve: Resolve = async function (ident, context, fallback) { if (isJS.test(ext) && isTS.test(context.parentURL)) { // reconstruct ".js" -> ".ts" source file path = output.href.substring(0, idx = match.index); - if (path = check(path + ext.replace('js', 'ts'))) { + if (path = check(path + ext.replace('js', 'ts')) || check(path + ext.replace('js', 'tsx'))) { idx += ext.length; if (idx > output.href.length) { path += output.href.substring(idx);