Skip to content

Commit

Permalink
enhance: support .jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
zhennann authored Jan 6, 2025
1 parent e8e8422 commit 031fa8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/compiler-sfc/src/script/resolveType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 031fa8f

Please sign in to comment.