diff --git a/tasks/clean.mjs b/tasks/clean.mjs index 9264c3e0651e..f906c3861cd3 100644 --- a/tasks/clean.mjs +++ b/tasks/clean.mjs @@ -11,3 +11,8 @@ await rimraf('packages/**/dist', { ignore: 'packages/**/{fixtures,__fixtures__}/**/dist', }, }) + +// Remove all `tsconfig.tsbuildinfo` files. +await rimraf('packages/**/tsconfig.tsbuildinfo', { + glob: true, +}) diff --git a/tasks/framework-tools/frameworkSyncToProject.mjs b/tasks/framework-tools/frameworkSyncToProject.mjs index fb8af9ac88d2..9263d56b3916 100644 --- a/tasks/framework-tools/frameworkSyncToProject.mjs +++ b/tasks/framework-tools/frameworkSyncToProject.mjs @@ -49,6 +49,8 @@ const ignored = [ // esbuild emits meta.json files that we sometimes suffix. /meta.(\w*\.?)json/, + /tsconfig.tsbuildinfo/, + (filePath) => IGNORE_EXTENSIONS.some((ext) => filePath.endsWith(ext)), ] @@ -241,6 +243,9 @@ async function main() { try { logStatus(`Cleaning ${c.magenta(packageName)}...`) await rimraf(path.join(path.dirname(packageJsonPath), 'dist')) + await rimraf( + path.join(path.dirname(packageJsonPath), 'tsconfig.tsbuildinfo') + ) logStatus(`Building ${c.magenta(packageName)}...`) execSync('yarn build', {