Skip to content

Commit

Permalink
fix(scan): handle tsx lang in SFCs during dep scan (#1837)
Browse files Browse the repository at this point in the history
  • Loading branch information
blake-newman committed Feb 1, 2021
1 parent da1b06f commit be9bc3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/optimizer/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ function esbuildScanPlugin(
const langMatch = openTag.match(langRE)
const lang =
langMatch && (langMatch[1] || langMatch[2] || langMatch[3])
if (lang === 'ts') {
loader = 'ts'
if (lang === 'ts' || lang === 'tsx') {
loader = lang
}
if (srcMatch) {
const src = srcMatch[1] || srcMatch[2] || srcMatch[3]
Expand Down

0 comments on commit be9bc3f

Please sign in to comment.