Skip to content

Commit

Permalink
fix(tsbb): fix match copy files.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 3, 2021
1 parent dc75f21 commit 286994f
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions packages/tsbb/src/utils/watchCompile.ts
Expand Up @@ -39,7 +39,14 @@ export async function watchCompile(
!isMatch(path.resolve(output), ['**/?(*.)+(spec|test).[jt]s?(x)', '**/*.d.ts', '**/tsconfig.json'])
) {
transform(filepath, { entryDir, esm, ...other });
} else if (!isMatch(path.resolve(output), ['**/?(*.)+(spec|test).[jt]s?(x)', '**/tsconfig.json', '**/*.d.ts'])) {
} else if (
!isMatch(path.resolve(output), [
'**/?(*.)+(spec|test).[jt]s?(x)',
'**/*.[jt]s?(x)',
'**/tsconfig.json',
'**/*.d.ts',
])
) {
const result = ts.sys.readFile(filepath);
outputFiles(output, result);
}
Expand All @@ -52,7 +59,14 @@ export async function watchCompile(
!isMatch(path.resolve(output), ['**/?(*.)+(spec|test).[jt]s?(x)', '**/*.d.ts'])
) {
transform(filepath, { entryDir, cjs, ...other });
} else if (!isMatch(path.resolve(output), ['**/?(*.)+(spec|test).[jt]s?(x)', '**/tsconfig.json', '**/*.d.ts'])) {
} else if (
!isMatch(path.resolve(output), [
'**/?(*.)+(spec|test).[jt]s?(x)',
'**/*.[jt]s?(x)',
'**/tsconfig.json',
'**/*.d.ts',
])
) {
const result = ts.sys.readFile(filepath);
outputFiles(output, result);
}
Expand Down

0 comments on commit 286994f

Please sign in to comment.