Skip to content

Commit ba63c61

Browse files
committedSep 13, 2021
fix(tsbb): Filter .[jt]s?(x) file copy.
1 parent 8d8adea commit ba63c61

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎packages/tsbb/src/cli.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const argv: ArgvArguments = parser(process.argv.slice(2), {
3535
return help();
3636
}
3737
try {
38-
argv.entry = path.resolve(process.cwd(), argv.entry || 'src/index.tsx');
38+
argv.entry = argv.entry || 'src/index.tsx';
3939
if (ts.sys.fileExists(argv.entry.replace(/\.tsx$/, '.ts'))) {
4040
argv.entry = argv.entry.replace(/\.tsx$/, '.ts');
4141
}

‎packages/tsbb/src/utils/compile.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export async function compile(
3838
!isMatch(item.path, ['**/?(*.)+(spec|test).[jt]s?(x)'])
3939
) {
4040
transform(item.path, { entryDir, cjs, ...other });
41-
} else {
41+
} else if (!isMatch(item.path, ['**/*.[jt]s?(x)'])) {
4242
copyFiles(item.path, cjsPath);
4343
}
4444
}
@@ -50,7 +50,7 @@ export async function compile(
5050
!isMatch(item.path, ['**/?(*.)+(spec|test).[jt]s?(x)'])
5151
) {
5252
transform(item.path, { entryDir, esm, ...other });
53-
} else {
53+
} else if (!isMatch(item.path, ['**/*.[jt]s?(x)'])) {
5454
copyFiles(item.path, esmPath);
5555
}
5656
}

0 commit comments

Comments
 (0)
Please sign in to comment.