Skip to content

Commit

Permalink
fix: should filter tsconfig.json
Browse files Browse the repository at this point in the history
  • Loading branch information
yimingjfe committed Sep 18, 2024
1 parent 80825c4 commit 0b7d43a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/server/utils/src/compilers/typescript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,14 @@ const readTsConfigByFile = (tsConfigFile: string, tsInstance: typeof ts) => {
return { options, fileNames, projectReferences };
};

const copyFiles = async (
from: string,
to: string,
appDirectory: string,
tsconfigPath: string,
) => {
const copyFiles = async (from: string, to: string, appDirectory: string) => {
if (await fs.pathExists(from)) {
const relativePath = path.relative(appDirectory, from);
const targetDir = path.join(to, relativePath);
await fs.copy(from, targetDir, {
filter: src =>
!['.ts', '.js'].includes(path.extname(src)) && src !== tsconfigPath,
!['.ts', '.js'].includes(path.extname(src)) &&
src.endsWith('tsconfig.json'),
});
}
};
Expand Down

0 comments on commit 0b7d43a

Please sign in to comment.