Repository navigation
Commit a05dffc
build: compile the docs without Turbopack's persistent cache (#2695)
## Context
- Refs #2684. Since it merged, every preview that contains it has failed
`docs (Preview)` at `site.browser.spec.ts:258`:
`/docs/concepts/flows-and-schemas` puts its h1 at x=462.5 instead of
310.5 (seen on #2558 and #2676).
## Summary
- Next 16.4 turns `experimental.turbopackFileSystemCacheForBuild` on by
default, so `next build` reuses Turbopack's cache in `.next/cache`.
Vercel restores that folder from an earlier deployment, and Turbopack
served `app/global.css` from before #2684. The failing preview's CSS
chunk matched main's production chunk except for the missing
`#fd-spacious-layout:not(:has(…))` rule. Turbo's own cache wasn't
involved: it reported a miss and ran `next build`.
- `apps/docs/next.config.mjs` turns that cache off, so every docs build
compiles from source. The cost is a somewhat slower `next build` on
Vercel.
## Validation
- Redeployed #2558's commit `470317b49` without the build cache (`POST
/v13/deployments?forceNew=1`). The log shows "Skipping build cache", the
deployed CSS has the rule, and `docs (Preview)` passed (run
41756864792).
- `node -e "import('./next.config.mjs')…"` resolves
`experimental.turbopackFileSystemCacheForBuild: false` through
`withStory(withMDX(...))`.
- This PR's own `docs (Preview)` covers the setting on Vercel.
## Release notes / changeset
- No changeset required — no shipped behavior changed.
## Notes
- `apps/website` also runs Next 16.4 on Vercel with the same default and
could serve stale output the same way. Left out to keep this change to
the docs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 8f490a4 commit a05dffc
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| |||
0 commit comments