Skip to content

Commit 2267265

Browse files
authored
fix: support tsx files in babel plugin scanning (#6)
The scanning takes place on the `dist` folder which has already transformed jsx to js so ensure the `x` is optional.
1 parent 683f9f3 commit 2267265

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/babel/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ function getFilesWithoutExtension(dirPath: string) {
3030
const files = entries.filter(
3131
(entry) =>
3232
entry.isFile() &&
33-
/\.[jt]sx$/.exec(entry.name) &&
34-
!/index\.[jt]sx$/.exec(entry.name),
33+
/\.[jt]sx?$/.exec(entry.name) &&
34+
!/index\.[jt]sx?$/.exec(entry.name),
3535
);
3636

3737
// For each file, get the filename without extension

0 commit comments

Comments
 (0)