Skip to content

Commit b5cded3

Browse files
authored
Add support for mts/cts (#172)
1 parent 5ee464e commit b5cded3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ function preactPlugin({
218218
"classProperties",
219219
"classPrivateProperties",
220220
"classPrivateMethods",
221-
!id.endsWith(".ts") && "jsx",
222-
/\.tsx?$/.test(id) && "typescript",
221+
!/\.[cm]?ts$/.test(id) && "jsx",
222+
/\.[cm]?tsx?$/.test(id) && "typescript",
223223
].filter(Boolean) as ParserPlugin[];
224224

225225
const result = await transformAsync(code, {

0 commit comments

Comments
 (0)