Files
vercel__next.js/test/unit
Will Binns-Smith 2cee98ab97 Sweep stale Turbopack output from distDir on dev startup (#97591)
## Summary

Turbopack dev never removes the content-hashed chunks it supersedes, so
`.next/dev` grows without bound. Webpack dev avoids this by wiping
`distDir` on every start.

Adds a `maxAgeMs` argument to `recursiveDeleteSyncWithAsyncRetries`:
delete files whose mtime is at least that old, remove directories once
empty. Turbopack dev passes one week.

## Verification

- `pnpm test-unit test/unit/recursive-delete.test.ts`
- ~Not run:~ dev-server behavior against a real `.next/dev`

<!-- NEXT_JS_LLM -->
2026-08-24 14:19:25 -07:00
..
2026-08-07 15:27:12 +02:00