From 031fa8f70f7dbdc064341c41315f626f45cd703e Mon Sep 17 00:00:00 2001 From: zhennann Date: Mon, 6 Jan 2025 10:24:16 +0800 Subject: [PATCH] enhance: support .jsx --- packages/compiler-sfc/src/script/resolveType.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-sfc/src/script/resolveType.ts b/packages/compiler-sfc/src/script/resolveType.ts index 6bb647f11ff..5f7f1952375 100644 --- a/packages/compiler-sfc/src/script/resolveType.ts +++ b/packages/compiler-sfc/src/script/resolveType.ts @@ -960,7 +960,7 @@ function importSourceToScope( function resolveExt(filename: string, fs: FS) { // #8339 ts may import .js but we should resolve to corresponding ts or d.ts - filename = filename.replace(/\.js$/, '') + filename = filename.replace(/\.jsx?$/, '') const tryResolve = (filename: string) => { if (fs.fileExists(filename)) return filename }