diff --git a/packages/server/utils/src/compilers/typescript/index.ts b/packages/server/utils/src/compilers/typescript/index.ts index f951d248dfe7..5c0686ced0e9 100644 --- a/packages/server/utils/src/compilers/typescript/index.ts +++ b/packages/server/utils/src/compilers/typescript/index.ts @@ -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'), }); } };