next.js
2cee98ab - Sweep stale Turbopack output from distDir on dev startup (#97591)

Commit
29 days ago
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 -->
Author
Parents
Loading