From 4cf06b63fa1807ccfbf14c0ef1f1fa9b1f268717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Wed, 3 Jul 2024 16:56:52 +0800 Subject: [PATCH] fix: match source file --- src/transform.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transform.ts b/src/transform.ts index 052b9279..68b5b6e4 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -9,7 +9,7 @@ import hashId from 'hash-sum' export const COMP_IDENTIFIER = `__sfc__` -const REGEX_JS = /\.[jt]sx?/ +const REGEX_JS = /\.[jt]sx?$/ function testTs(filename: string | undefined | null) { return !!(filename && /(\.|\b)tsx?$/.test(filename)) }